From: hno <> Date: Sat, 3 Apr 2004 22:10:56 +0000 (+0000) Subject: Bug #925: squidclient auth headers malformed X-Git-Tag: SQUID_3_0_PRE4~1120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a394841f0ef5f31bd5f7816953f9717d69251a4a;p=thirdparty%2Fsquid.git Bug #925: squidclient auth headers malformed If the proxy or web server authentication options of squidclient is used then the HTTP headers sent in the request is slightly malformed and may confuse other non-Squid software which is not as tolerant on HTTP format. --- diff --git a/src/client.cc b/src/client.cc index bb8ae35ba3..5d43b717f2 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,6 +1,6 @@ /* - * $Id: client.cc,v 1.106 2003/04/24 06:35:08 hno Exp $ + * $Id: client.cc,v 1.107 2004/04/03 15:10:56 hno Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived @@ -334,7 +334,7 @@ main(int argc, char *argv[]) } snprintf(buf, BUFSIZ, "%s:%s", user, password); - snprintf(buf, BUFSIZ, "Proxy-Authorization: Basic %s\n", base64_encode(buf)); + snprintf(buf, BUFSIZ, "Proxy-Authorization: Basic %s\r\n", base64_encode(buf)); strcat(msg, buf); } @@ -354,7 +354,7 @@ main(int argc, char *argv[]) } snprintf(buf, BUFSIZ, "%s:%s", user, password); - snprintf(buf, BUFSIZ, "Authorization: Basic %s\n", base64_encode(buf)); + snprintf(buf, BUFSIZ, "Authorization: Basic %s\r\n", base64_encode(buf)); strcat(msg, buf); }