From: rousskov <> Date: Thu, 26 Feb 1998 13:42:29 +0000 (+0000) Subject: Added a _hack_ to force HTTP/1.0 replies regardless of the server reply X-Git-Tag: SQUID_3_0_PRE1~3979 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae1acd0b273996c16cbcf98e8df11beede34114c;p=thirdparty%2Fsquid.git Added a _hack_ to force HTTP/1.0 replies regardless of the server reply version. This will be rewritten. --- diff --git a/src/client_side.cc b/src/client_side.cc index f73401b5dd..c95f445ef6 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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;