Re: [squid-users] HTTP Response processing

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 05 Feb 2014 02:30:04 +1300

On 4/02/2014 11:28 p.m., Bhagwat Yadav wrote:
> Thanks Amos for quick response.
>
> Actually I need to take decision in the code where the HTTP response is handled.
>
> Could you please guide me to the correct location in code where I need
> implement my check for the above processing?

If you insist. Reply processing starts in src/http.cc with the name
HttpStateData::readReply.

After parsing the reply you need to test for your condition (guess what
reply_http_access does?)

Then replace the reply state with an ErrorStateData object (guess what
deny_info does?), mark it as completed and drain the server TCP
connection until the original reply data it tries to send is all finished.

Good luck.

Amos
Received on Tue Feb 04 2014 - 13:30:07 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 04 2014 - 12:00:04 MST