]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #925: squidclient auth headers malformed
authorhno <>
Sat, 3 Apr 2004 22:10:56 +0000 (22:10 +0000)
committerhno <>
Sat, 3 Apr 2004 22:10:56 +0000 (22:10 +0000)
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.

src/client.cc

index bb8ae35ba37d5c57c89e246fc3cc210bd5a93285..5d43b717f2b23fe9b475bd6a04ce642c73ecb8a9 100644 (file)
@@ -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);
     }