From: Amos Jeffries Date: Wed, 16 Sep 2009 08:41:32 +0000 (+1200) Subject: Prevent squidclient sending two Accept: headers X-Git-Tag: SQUID_3_1_0_14~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a226d898f07e72da4e8f8f9fd2c476d624137b0;p=thirdparty%2Fsquid.git Prevent squidclient sending two Accept: headers --- diff --git a/tools/squidclient.cc b/tools/squidclient.cc index 999648cecd..547dfe093d 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -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");