From 09b7c8a15e9b53b0417ac21ff83d95e18e88d00b Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 6 Mar 2010 19:13:30 +1300 Subject: [PATCH] Author: Henrik Nordstrom Swallow 1xx status messages Ported from 2.7. This makes Squid swallow 1xx replies from 1.1 servers safely without breaking the clients connection. --- src/http.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/http.cc b/src/http.cc index 5578f1777b..278786c224 100644 --- a/src/http.cc +++ b/src/http.cc @@ -748,6 +748,19 @@ HttpStateData::processReplyHeader() readBuf->consume(header_bytes_read); } + /* Skip 1xx messages for now. Advertised in Via as an internal 1.0 hop */ + if (newrep->sline.status >= 100 && newrep->sline.status < 200) { + delete newrep; + debugs(11, 2, HERE << "1xx headers consume " << header_bytes_read << " bytes header."); + header_bytes_read = 0; + if (reply_bytes_read > 0) + debugs(11, 2, HERE << "1xx headers consume " << reply_bytes_read << " bytes reply."); + reply_bytes_read = 0; + ctx_exit(ctx); + processReplyHeader(); + return; + } + flags.chunked = 0; if (newrep->header.hasListMember(HDR_TRANSFER_ENCODING, "chunked", ',')) { flags.chunked = 1; -- 2.47.2