------------------------------------------------------------ revno: 13393 revision-id: chtsanti@users.sourceforge.net-20140503105356-o7xoklwov0wy8q37 parent: squid3@treenet.co.nz-20140503103531-z7goapps6xsl2dhf committer: Christos Tsantilas branch nick: trunk timestamp: Sat 2014-05-03 13:53:56 +0300 message: 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: chtsanti@users.sourceforge.net-20140503105356-\ # o7xoklwov0wy8q37 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: b03c65952eeba4e98815f58aa2b3e8d291b90075 # timestamp: 2014-05-03 11:03:23 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140503103531-\ # z7goapps6xsl2dhf # # Begin patch === modified file 'src/adaptation/ecap/MessageRep.cc' --- src/adaptation/ecap/MessageRep.cc 2014-04-27 07:59:17 +0000 +++ src/adaptation/ecap/MessageRep.cc 2014-05-03 10:53:56 +0000 @@ -135,7 +135,7 @@ 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 @@ 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