Backport of:

------------------------------------------------------------
revno: 13990
revision-id: rousskov@measurement-factory.com-20160218041533-8tmtd45c3nky2gyy
parent: squid3@treenet.co.nz-20160215135848-ms0dmjsfouxcb8g2
committer: Alex Rousskov <rousskov@measurement-factory.com>
branch nick: 3.5
timestamp: Wed 2016-02-17 21:15:33 -0700
message:
  Better handling of huge response headers. Fewer "BUG 3279" messages.
  
  When we failed to parse a response, do not store the fake half-baked
  response (via a replaceHttpReply() call). Doing so leads to misleading
  "BUG 3279: HTTP reply without Date" messages (at best).  The fake
  response is only meant for continueAfterParsingHeader().
  
  Also removed a misleading XXX that may have caused Bug 4432 in v4.0
  (trunk r14548).
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: rousskov@measurement-factory.com-20160218041533-\
#   8tmtd45c3nky2gyy
# target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
# testament_sha1: 0a7978c0442191d33a9472c6185692a78da6c0b0
# timestamp: 2016-02-18 04:50:56 +0000
# source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
# base_revision_id: squid3@treenet.co.nz-20160215135848-\
#   ms0dmjsfouxcb8g2
# 
# Begin patch
=== modified file 'b/src/http.cc'
Index: squid3-3.3.8/src/http.cc
===================================================================
--- squid3-3.3.8.orig/src/http.cc	2016-03-04 14:58:47.198038186 -0500
+++ squid3-3.3.8/src/http.cc	2016-03-04 14:58:47.194038133 -0500
@@ -744,8 +744,7 @@
             flags.headers_parsed = true;
             newrep->sline.version = HttpVersion(1,1);
             newrep->sline.status = error;
-            HttpReply *vrep = setVirginReply(newrep);
-            entry->replaceHttpReply(vrep);
+            setVirginReply(newrep);
             ctx_exit(ctx);
             return;
         }
