Re: [squid-users] Icap Reqmod

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 05 Nov 2009 17:35:10 +1300

Robert Szabo wrote:
> Hi Amos,
>
> Many thanks for the quick response.
>
> I am currently using Current Beta Squid 3.1.0.14.
>
> I removed the --spider option from the wget command and this is the
> output
>
> -- reqmod issues by squid --
> REQMOD icap://127.0.0.1:8082/reqmod ICAP/1.0
> Host: 127.0.0.1:8082
> Date: Wed, 04 Nov 2009 13:45:18 GMT
> Encapsulated: req-hdr=0, null-body=134
> Allow: 204
>
> GET http://www.888.com/ HTTP/1.0
> User-Agent: Wget/1.11.4 (Red Hat modified)
> Accept: */*
> Host: www.888.com
> X-UserId: 5555552222
>
>
> -- my response --
> ICAP/1.0 200 OK
> Encapsulated: req-hdr=0, null-body=131
> ISTag: istag
> Server: AMS-ICAP-Server-Software/1.0
> Content-Length: 131
>
> GET www.nogo.com/redirect.pl?cat=19&a=b HTTP/1.0
> Accept: */*
> User-Agent: Wget/1.11.4 (Red Hat modified)
> X-UserId: 5555552222
>
>
> Could this be failing due to the missed Host header in the response or
> the lack of http:// in the GET portion of the response?

Yes. Raw domain name like that is invalid URL.

Squid should be detecting it broken and abort the ICAP response
handling. Dropping back to pass-thru the original request.

>
> If you have a trace of a working request/response performing url
> redirection, I would truly welcome it.

To copy-n-paste your example and add the missing HTTP bits in I expect
this to work:

> -- reqmod issues by squid --
> REQMOD icap://127.0.0.1:8082/reqmod ICAP/1.0
> Host: 127.0.0.1:8082
> Date: Wed, 04 Nov 2009 13:45:18 GMT
> Encapsulated: req-hdr=0, null-body=134
> Allow: 204
>
> GET http://www.888.com/ HTTP/1.0
> User-Agent: Wget/1.11.4 (Red Hat modified)
> Accept: */*
> Host: www.888.com
> X-UserId: 5555552222
>
>
> -- my response --
> ICAP/1.0 200 OK
> Encapsulated: req-hdr=0, null-body=131
> ISTag: istag
> Server: AMS-ICAP-Server-Software/1.0
> Content-Length: 131
>
   GET http://www.nogo.com/redirect.pl?cat=19&a=b HTTP/1.0
   Host: www.nogo.com
> Accept: */*
> User-Agent: Wget/1.11.4 (Red Hat modified)
> X-UserId: 5555552222

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.14
Received on Thu Nov 05 2009 - 04:35:34 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 05 2009 - 12:00:03 MST