From: Alex Rousskov Date: Thu, 19 Nov 2015 05:05:49 +0000 (-0800) Subject: Fix status code-based HTTP reason phrase for eCAP-generated messages. X-Git-Tag: SQUID_3_5_12~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=243080b631f6a28f2ccd78a2de5a3626ea03cab7;p=thirdparty%2Fsquid.git Fix status code-based HTTP reason phrase for eCAP-generated messages. Calling .reason() on a not-yet-set theMessage.sline object resulted in "Init" status reason phrase for all from-scratch (i.e., not cloned) eCAP-made HTTP responses. This fix lets Squid compute the reason phrase based on the status code, just like Squid does for forwarded responses (IIRC). --- diff --git a/src/adaptation/ecap/MessageRep.cc b/src/adaptation/ecap/MessageRep.cc index a786c15771..5bc8294675 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -297,7 +297,7 @@ Adaptation::Ecap::StatusLineRep::StatusLineRep(HttpReply &aMessage): void Adaptation::Ecap::StatusLineRep::statusCode(int code) { - theMessage.sline.set(theMessage.sline.version, static_cast(code), theMessage.sline.reason()); + theMessage.sline.set(theMessage.sline.version, static_cast(code), NULL); } int