]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added a _hack_ to force HTTP/1.0 replies regardless of the server reply
authorrousskov <>
Thu, 26 Feb 1998 13:42:29 +0000 (13:42 +0000)
committerrousskov <>
Thu, 26 Feb 1998 13:42:29 +0000 (13:42 +0000)
version. This will be rewritten.

src/client_side.cc

index f73401b5dd656eb4fb024e00bae258843efa93b2..c95f445ef68068181d3201d2606c5673cd9bcf58 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.215 1998/02/25 09:53:55 rousskov Exp $
+ * $Id: client_side.cc,v 1.216 1998/02/26 06:42:29 rousskov Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -890,6 +890,10 @@ clientBuildReplyHeader(clientHttpRequest * http,
        hdr_len = t - hdr_in;
        l = strcspn(t, crlf) + 1;
        xstrncpy(xbuf, t, l > 4096 ? 4096 : l);
+       /* enforce 1.0 reply version, this hack will be rewritten */
+       if (!hdr_len && !strncasecmp(xbuf, "HTTP/", 5) && l > 8 && 
+           ( isspace(xbuf[8]) || isspace(xbuf[9])))
+           xmemmove(xbuf+5, "1.0 ", 4);
 #if 0
        if (strncasecmp(xbuf, "Accept-Ranges:", 14) == 0)
            continue;