Re: Squid-2.5 ICAP client

From: Geetha Manjunath <geetham@dont-contact.us>
Date: Wed, 26 Mar 2003 17:57:04 +0530

Hello Henrik,

This piece of code is related to the call to clientReadRequest from the
function icapReqModReadReply in icap.c . The function
icapReqModReadReply reads the modified http request from the icap server
- which is in reply to a reqmod request - and processes this new
request. You will notice that I am creating a conn structure there to
simulate a client connection.

Though it is a bit of a hack, I saw that a lot of existing squid code
could be easily resused by doing this and also I thought this was a nice
way of coming into the main stream of request processing. I just had to
short circuit the access check since it was already done on the orig
request - and conn->me.sin_family acts as a flag there to do that.

Please let me know if this breaks some things elsewhere - I did not come
across any such situation in my testing though. Also, if I can acheive
the same thru some other means, please let me know..

But this works ;-)

regards
Geetha

Henrik Nordstrom wrote:
>
> Hello Geetha,
>
> I am currently investigating the Squid-2.5 ICAP client patch, and there
> is a small section in clientReadRequest which I need to have explained
> to me:
>
> In clientReadRequest you have this fragment:
>
> }
> }
> +#ifdef HS_FEAT_ICAP
> + /* I need to read the modified request header from icap
> server -
> + allow me. If it has come through Accept go ahead and
> service..
> + else don;t */
> + if (conn->me.sin_family)
> +#endif
> + {
> clientAccessCheck(http);
> + }
> continue; /* while offset > 0 && body.size_left ==
> 0 */
> } else if (parser_return_code == 0) {
>
> I do not quite understand what this fragment is supposed to be doing.
> What is the relation on conn->me.sin_family here?
>
> Regards
> Henrik
>
> --
> Henrik Nordstrom <hno@squid-cache.org>
> MARA Systems AB, Sweden
Received on Wed Mar 26 2003 - 05:25:29 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:35 MST