Re: [squid-users] Trying to trouble-shot a squid redirector error

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Mon, 05 Nov 2007 09:25:50 -0700

On Fri, 2007-11-02 at 12:01 -0500, ying lcs wrote:

> I am trying to setup squid redirector on squid 2.6 STABLE 16 based on
> content type. i.e. if squid sees content type == text/plain redirects
> to 'http://127.0.0.1/dummy.txt'.
>
> A kind person helped me with this configuration for my needs:
> acl plain_content rep_mime_type -i text/plain
> redirect_program /usr/local/bin/myscript
> redirector_access allow plain_content
> #http_reply_access allow all
> icp_access allow all
>
>
> But I am still not able to get that to work.
> For example, when i request 127.0.0.1/plain.txt via squid, I expect I
> get the content of 127.0.0.1/dummy.txt (since squid redirect it based
> on content type), but I am getting content of 127.0.0.1/plain.txt.
>
> Here is my access.log:
>
> 1193971388.409 15 127.0.0.1 TCP_MISS/200 357 GET http://127.0.0.1/plain.txt
> - DIRECT/127.0.0.1 text/plain

Redirector programs work on HTTP requests. The reply content type is an
HTTP response property. By the time Squid knows the type, it is too late
to redirect anything.

Alex.
Received on Mon Nov 05 2007 - 09:26:14 MST

This archive was generated by hypermail pre-2.1.9 : Sat Dec 01 2007 - 12:00:01 MST