Skip to content

Commit

Permalink
Fix HTTP 1.0 body fetch.
Browse files Browse the repository at this point in the history
Not that we should ever really see one.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jan 3, 2010
1 parent f900f63 commit 7733c51
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions http.c
Expand Up @@ -191,10 +191,6 @@ static int process_http_response(struct openconnect_info *vpninfo, int *result,
if (*result == 100)
goto cont;

/* Now the body, if there is one */
if (!bodylen)
goto fin;

if (http10) {
/* HTTP 1.0 response. Just eat all we can. */
while (1) {
Expand All @@ -204,6 +200,11 @@ static int process_http_response(struct openconnect_info *vpninfo, int *result,
done += i;
}
}

/* Now the body, if there is one */
if (!bodylen)
goto fin;

/* If we were given Content-Length, it's nice and easy... */
if (bodylen > 0) {
while (done < bodylen) {
Expand Down

0 comments on commit 7733c51

Please sign in to comment.