]> git.ipfire.org Git - thirdparty/squid.git/commit
Stop HttpRequest and AccessLogEntry memory leaks.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 22 Jul 2012 03:15:02 +0000 (21:15 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 22 Jul 2012 03:15:02 +0000 (21:15 -0600)
commit4bf68cfabb8a0db84bb0070541ca727179855edc
tree60576c300b5cb4e397952ce5cd33785cf64c2476
parentc4eab9746768a315104d46353c7fdc55258b91f3
Stop HttpRequest and AccessLogEntry memory leaks.

The leaks were introduced by recent request_header_add improvements (r12213)
which needed server-side access to client-side information like client
certificate so that it can be stuffed into the outgoing request headers.
Stuffing was done via Format API that uses AccessLogEntry as the source of
information.

This change breaks the HttpRequest->AccessLogEntry->HttpRequest refcounting
loop that prevented both request and ale objects from being destroyed. The ale
object is now delivered to the server side using FwdState::Start() API.  Only
HTTP code currently takes advantage of ale availability on the server side.

Also had to modify httpHdrAdd() API because ale is no longer available via
the request pointer.
src/HttpHeaderTools.cc
src/HttpRequest.cc
src/HttpRequest.h
src/client_side.cc
src/client_side_reply.cc
src/forward.cc
src/forward.h
src/htcp.cc
src/http.cc
src/http.h
src/tunnel.cc