From: Alex Rousskov Date: Sun, 15 Nov 2015 16:59:12 +0000 (-0700) Subject: Fixed status code-based HTTP reason phrase for eCAP-generated messages. X-Git-Tag: SQUID_4_0_3~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ca77494acbc1c22007d50b2b977a82e1aa5e370;p=thirdparty%2Fsquid.git Fixed 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 1124da419b..9011dfd02e 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -290,7 +290,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), nullptr); } int