On Mon, 15 Dec 2003, WA Support wrote:
> But, squid does know the size of the response from the server and
> records this in the access.log.
Yes, but redirectors is used BEFORE the request is forwarded.
> So, what is the variable that squid stores the response size in? Or what
> squid module writes to the access.log, and I can track the variable down
> with some debugging hooks.
access_log.c
> Once I know the variable name that squid user to hold the response size
> in, I can take care of passing this to the redirector.
This is simply not possible. The response size is not known when the
redirector is used. Redirectors operate on the request long before it is
known what this request results into.
The sequence of events is rougly:
1 Client sends request to Squid
2 Access Controls
3 Redirector lookup
4 Cache lookup. Processing stops here on cache hit.
5 Request is forwarded
6 Response is read from server
7 Response forwarded to client
8 Access.log written with information from both request and response
The original/main purpose of redirectors is to redirect requests for
common resources to known local mirriros even if the user did not know the
information was mirrored locally. This is why it is called redirectors.
> > If you are talking about the request size or the request sent by the
> > client to the server then there is plans on extending the access log
> > capabilities of Squid to allow inclusion of this in the access log, but
> > implementation is not finished (and no timeplan for this today).
>
> I guess I do not understand what you are saying here. I didn't know
> that the client knew anything about size; I just thought that the server
> returned a size for each GET requested by the client.
What I am talking about here is the size of the requests as such, not the
returned information.
In simple requests this is just the URL + request headers. Complex methods
such as POST or PUT includes content which is sent TO the server and can
be quite a bit of information and some wants to account this, but
unfortunately Squid does not provide such information easily.
Regards
Henrik
Received on Mon Dec 15 2003 - 14:58:03 MST
This archive was generated by hypermail pre-2.1.9 : Thu Jan 01 2004 - 12:00:13 MST