]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Close https connection when falling back to non-xmlpost mode
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 24 May 2013 22:42:14 +0000 (23:42 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 24 May 2013 22:45:14 +0000 (23:45 +0100)
Some servers will continue to respond with a redirect, even redirecting a
request back to the *same* URL that was requested, unless we close the
connection and try again.

Red Hat bug #964650.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c
www/changelog.xml

diff --git a/http.c b/http.c
index 62d36944874ef0b2a20f81b1a301fca00a0f9606..bb707a3e7ae1c37f5398249515f94a2866211ef8 100644 (file)
--- a/http.c
+++ b/http.c
@@ -999,6 +999,7 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo)
                                request_body_type = NULL;
                                request_body[0] = 0;
                                method = "GET";
+                               openconnect_close_https(vpninfo, 0);
                        } else {
                                return -EIO;
                        }
index 19d7a102bd52e6e7bafe2dcf274652452c7794e9..b5bf5ab35ef2c84fc813ae86a03aee870b9ee48b 100644 (file)
@@ -17,6 +17,7 @@
 <ul>
    <li><b>OpenConnect HEAD</b>
      <ul>
+       <li>Close connection before falling back to non-xmlpost mode <a href="https://bugzilla.redhat.com/show_bug.cgi?id=964650"><i>(RH#964650)</i></a></li>
        <li>Improve error handling when server closes connection (<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708928">Debian bug #708928</a>)</li>
      </ul><br/>
   </li>