Don't elide webvpn cookie if it's empty
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 29 Nov 2010 13:47:59 +0000 (13:47 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 30 Nov 2010 08:38:08 +0000 (08:38 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c

diff --git a/http.c b/http.c
index 89f1e41..a9d457a 100644 (file)
--- a/http.c
+++ b/http.c
@@ -162,9 +162,9 @@ static int process_http_response(struct openconnect_info *vpninfo, int *result,
                        *(equals++) = 0;
 
                        print_equals = equals;
-                       /* Don't print the webvpn cookie; we don't want people posting it
-                          in public with debugging output */
-                       if (!strcmp(colon, "webvpn"))                           
+                       /* Don't print the webvpn cookie unless it's empty; we don't
+                          want people posting it in public with debugging output */
+                       if (!strcmp(colon, "webvpn") && *equals)
                                print_equals = "<elided>";
                        vpninfo->progress(vpninfo, PRG_TRACE, "%s: %s=%s%s%s\n",
                                          buf, colon, print_equals, semicolon?";":"",