------------------------------------------------------------ revno: 12629 revision-id: squid3@treenet.co.nz-20130929175016-2g2sivpi30hxd2ki parent: squid3@treenet.co.nz-20130929174716-pfqomyh6b0kkix8c fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3929 author: libit committer: Amos Jeffries branch nick: 3.3 timestamp: Sun 2013-09-29 11:50:16 -0600 message: Bug 3929: request_header_add not working for tunnel requests ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130929175016-2g2sivpi30hxd2ki # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: ec36f1f4fd8e3139a302646d87de7bf7f16a50ed # timestamp: 2013-09-29 17:55:08 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130929174716-\ # pfqomyh6b0kkix8c # # Begin patch === modified file 'src/client_side_request.cc' --- src/client_side_request.cc 2013-07-13 12:40:22 +0000 +++ src/client_side_request.cc 2013-09-29 17:50:16 +0000 @@ -1386,7 +1386,7 @@ #endif logType = LOG_TCP_MISS; getConn()->stopReading(); // tunnels read for themselves - tunnelStart(this, &out.size, &al->http.code); + tunnelStart(this, &out.size, &al->http.code, al); return; } === modified file 'src/client_side_request.h' --- src/client_side_request.h 2012-09-25 16:38:36 +0000 +++ src/client_side_request.h 2013-09-29 17:50:16 +0000 @@ -207,7 +207,7 @@ /* ones that should be elsewhere */ void redirectStart(ClientHttpRequest *, RH *, void *); -void tunnelStart(ClientHttpRequest *, int64_t *, int *); +void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntry::Pointer &al); #if _USE_INLINE_ #include "Store.h" === modified file 'src/tunnel.cc' --- src/tunnel.cc 2013-02-03 14:06:15 +0000 +++ src/tunnel.cc 2013-09-29 17:50:16 +0000 @@ -79,6 +79,7 @@ bool noConnections() const; char *url; HttpRequest *request; + AccessLogEntryPointer al; Comm::ConnectionList serverDestinations; const char * getHost() const { @@ -645,7 +646,7 @@ nfmark_t GetNfmarkToServer(HttpRequest * request); void -tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr) +tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr, const AccessLogEntryPointer &al) { debugs(26, 3, HERE); /* Create state structure. */ @@ -690,6 +691,7 @@ tunnelState->server.size_ptr = size_ptr; tunnelState->status_ptr = status_ptr; tunnelState->client.conn = http->getConn()->clientConnection; + tunnelState->al = al; comm_add_close_handler(tunnelState->client.conn->fd, tunnelClientClosed, @@ -720,7 +722,7 @@ mb.Printf("CONNECT %s HTTP/1.1\r\n", tunnelState->url); HttpStateData::httpBuildRequestHeader(tunnelState->request, NULL, /* StoreEntry */ - NULL, /* AccessLogEntry */ + tunnelState->al, /* AccessLogEntry */ &hdr_out, flags); /* flags */ packerToMemInit(&p, &mb);