Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lavabit/magma.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjpadkins <jacobpadkins@gmail.com>2017-04-05 17:48:07 +0300
committerjpadkins <jacobpadkins@gmail.com>2017-04-05 17:48:07 +0300
commitb9fa02bcaa4415aad1db91f2c6f309f08a13a9ee (patch)
tree66a2855842098023be90b0d925a6c9e822ae27e1 /check/magma/servers/http/http_check_network.c
parent2f9a70dcf95882c1cdeea6e6e18fad1bd72389db (diff)
Added working camel auth test and helper functions
Diffstat (limited to 'check/magma/servers/http/http_check_network.c')
-rw-r--r--check/magma/servers/http/http_check_network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/check/magma/servers/http/http_check_network.c b/check/magma/servers/http/http_check_network.c
index 2b1e891c..7aca3d38 100644
--- a/check/magma/servers/http/http_check_network.c
+++ b/check/magma/servers/http/http_check_network.c
@@ -32,10 +32,12 @@ bool_t check_http_read_to_empty(client_t *client) {
*/
size_t check_http_content_length_get(client_t *client) {
- size_t location = 0, content_length;
+ size_t location = 0, content_length = 0;
placer_t cl_placer = pl_null();
- while (st_cmp_ci_starts(&(client->line), NULLER("Content-Length:")) != 0) client_read_line(client);
+ while (st_cmp_ci_starts(&(client->line), NULLER("Content-Length:")) != 0) {
+ if (client_read_line(client) <= 2) return content_length;
+ }
if (!st_search_chr(&(client->line), ' ', &location)) {
//st_sprint(errmsg, "The Content-Length line was improperly formed.");