From 67e0f8216ea375b53575d7bfda2c675bc1195a4e Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 4 Feb 2013 15:00:39 +0000 Subject: [PATCH] Reinstate compatibility with test server hack Signed-off-by: David Woodhouse --- http.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/http.c b/http.c index c05340f..bcc4e98 100644 --- a/http.c +++ b/http.c @@ -388,6 +388,7 @@ static int process_http_response(struct openconnect_info *vpninfo, int *result, if (!closeconn) { vpn_progress(vpninfo, PRG_ERR, _("Cannot receive HTTP 1.0 body without closing connection\n")); + openconnect_close_https(vpninfo, 0); return -EINVAL; } @@ -989,6 +990,10 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo) free(form_buf); return result; } + if (form->action) { + vpninfo->redirect_url = strdup(form->action); + handle_redirect(vpninfo); + } } /* Step 4: Run the CSD trojan, if applicable */ -- 2.7.4