Fix handling of 'HTTP/1.1 100 Continue' response
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 3 Jan 2010 18:22:40 +0000 (18:22 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 3 Jan 2010 18:22:40 +0000 (18:22 +0000)
When we jump back to 'cont' it needs to fetch the next response line,
not just check the existing contents of the buffer (which will be an
empty line).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c

diff --git a/http.c b/http.c
index dee9ad4..db56d0c 100644 (file)
--- a/http.c
+++ b/http.c
@@ -104,12 +104,12 @@ static int process_http_response(struct openconnect_info *vpninfo, int *result,
        int http10 = 0, closeconn = 0;
        int i;
 
+ cont:
        if (openconnect_SSL_gets(vpninfo->https_ssl, buf, sizeof(buf)) < 0) {
                vpninfo->progress(vpninfo, PRG_ERR, "Error fetching HTTPS response\n");
                return -EINVAL;
        }
 
- cont:
        if (!strncmp(buf, "HTTP/1.0 ", 9)) {
                http10 = 1;
                closeconn = 1;