]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Prevent squidclient sending two Accept: headers
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 8 Sep 2009 10:55:58 +0000 (22:55 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 8 Sep 2009 10:55:58 +0000 (22:55 +1200)
tools/squidclient.cc

index 999648cecd68bf93fa59475b24845acb37e7adbd..547dfe093de34ffc3e021c5f191adede1955e34c 100644 (file)
@@ -436,16 +436,16 @@ main(int argc, char *argv[])
         /* HTTP/1.0 may need keep-alive */
         if (strcmp(version, "1.0") == 0) {
             if (keep_alive) {
-                if (strchr(url, ':'))
+                if (strchr(url, ':')) {
                     snprintf(buf, BUFSIZ, "Proxy-Connection: keep-alive\r\n");
-                else
+                    strcat(msg, buf);
+                } else
                     strcat(msg, "Connection: keep-alive\r\n");
             }
         } else {
             if (!keep_alive)
                 strcat(msg, "Connection: close\r\n");
         }
-        strcat(msg, buf);
 
         strcat(msg, extra_hdrs);
         strcat(msg, "\r\n");