Re: direct responce from ICAP server in REQMOD

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Tue, 03 Apr 2007 09:04:57 -0600

On Wed, 2007-03-28 at 21:03 +0300, Tsantilas Christos wrote:
> When an ICAP server responds with an http response in request
> modification, the web client waits more data from
> the proxy. Iam using the squid3-icap branch.
>
> An example of such ICAP response is:
>
> ICAP/1.0 200 OK
> Connection: keep-alive
> ISTag: CI0001-XXXXXXXXX
> Encapsulated: res-hdr=0, res-body=108
>
> HTTP/1.0 403 Forbidden
> Content-Type: text/html
> Content-Language: en
> Connection: close
>
> 17
> <H1>Permition deny!<H1>
> 0
>
> The proxy server sends the correct data to the client, but does not
> close the connection after send all data.
> Adding the line
> storeEntry()->complete();
> in ClientHttpRequest::endRequestSatisfaction method solves the problem
> but I think that the solution is not so simple, we need to know how to
> setup the StoreEntry...

Nevertheless, I will commit your fix. Using the right sequences of
entry-related calls has always eluded me, but calling complete() looks
reasonable based on the existing code than handles "real" responses.

If somebody knows whether any other entry-related things should be done
to correctly finish an ICAP-made HTTP response, please chime in.

Thank you,

Alex.
Received on Tue Apr 03 2007 - 09:05:07 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Apr 29 2007 - 12:00:03 MDT