Re: [squid-users] Size Of Download Control

2003-12-15 Thread WA Support
Thank you for the clarifications!  I understand now!


Murrah Boswell


Re: [squid-users] Size Of Download Control

2003-12-15 Thread Henrik Nordstrom
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



Re: [squid-users] Size Of Download Control

2003-12-15 Thread WA Support

> 
> You can't do accounting of responses in redirectors. The size of the
> response is only known when having read the response.

But, squid does know the size of the response from the server and
records this in the access.log.  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.

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.

> 
> 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.

Thanks,

Murrah Boswell

> 
> Regards
> Henrik


Re: [squid-users] Size Of Download Control

2003-12-14 Thread Henrik Nordstrom
On Sat, 13 Dec 2003, OTR Comm wrote:

> Does squid record or know about the size (in bytes) of each GET?  If
> not, is there any way to get this info from the Web Server?

The size of the response is logged in access.log.

> If so, what structure does it use to record this info?  I want to pass
> the size of each GET to a modified verion of squidGuard so I can do some
> quota checking!

You can't do accounting of responses in redirectors. The size of the
response is only known when having read the response.

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).

Regards
Henrik



[squid-users] Size Of Download Control

2003-12-13 Thread OTR Comm
Hello,

Does squid record or know about the size (in bytes) of each GET?  If
not, is there any way to get this info from the Web Server?

If so, what structure does it use to record this info?  I want to pass
the size of each GET to a modified verion of squidGuard so I can do some
quota checking!

I assume that squid does keep track of the size of the GETs (maybe I am
wrong), so if I knew the structure that holds this info, I will rewrite
the code to pass it to squidGuard and rework squidGuard to deal with
this new info.

Thanks,
Murrah Boswell