From: Christos Tsantilas Date: Sat, 3 May 2014 10:53:56 +0000 (+0300) Subject: Fix eCAP to build after patch r13384 X-Git-Tag: SQUID_3_5_0_1~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1675134bf5844560c5a440e5b9deb2e6deff94;p=thirdparty%2Fsquid.git Fix eCAP to build after patch r13384 The HttpMsg::protocol removed with "Bug 1961: pt1: URL handling redesign" patch, and as a result the eCAP squid subsystem does not build because used this memberto implement libecap::RequestLine and libecap::StatusLine classes. The HttpMsg::protocol used to hold the protocol part of the request URI. However the libecap::FirstLine::protocol() is meant for things like * the HTTP-Version part of HTTP messages (in RFC 2616 terminology) or * the ICAP-Version part of ICAP messages (in RFC 3507 terminology). It is not related to the URI. This patch fix this and now libecap::RequestLine and libecap::StatusLine implemented to return the protocol information from request or status line of headers. --- diff --git a/src/adaptation/ecap/MessageRep.cc b/src/adaptation/ecap/MessageRep.cc index bb06ede8a5..cbca93693c 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -135,7 +135,7 @@ libecap::Name Adaptation::Ecap::FirstLineRep::protocol() const { // TODO: optimize? - switch (theMessage.protocol) { + switch (theMessage.http_ver.protocol) { case AnyP::PROTO_HTTP: return libecap::protocolHttp; case AnyP::PROTO_HTTPS: @@ -179,7 +179,7 @@ void Adaptation::Ecap::FirstLineRep::protocol(const Name &p) { // TODO: what happens if we fail to translate some protocol? - theMessage.protocol = TranslateProtocolId(p); + theMessage.http_ver.protocol = TranslateProtocolId(p); } AnyP::ProtocolType