Re: [squid-users] location_rewrite_program in 3.1

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 23 Nov 2010 16:05:19 -0700

On 11/23/2010 02:46 PM, Amos Jeffries wrote:
> On Tue, 23 Nov 2010 11:27:03 -0600, Dan Johansson wrote:
>> On 11/22/2010 06:27 PM, Amos Jeffries wrote:
>>> eCAP could do it as a workaround. Technically with squid focus on not
>>> altering requests itself this is theoretically the correct way to do it.
>>> long-term plans are to port location_rewrite eventually unless someone
>>> comes up with a fast eCAP plugin for it.
>>
>> Can eCAP intercept 30x redirects? I have worked with ICAP and as far as
>> I could tell, that did not intercept 30x redirect responses (maybe I
>> missed something?). If it does I could certainly see it working, and
>> something that would be much easier to implement and maintain.
>
> Hmm, good question.
> I was under the impression all response messages going to and from servers
> were adaptable.

Yes, Squid ICAP and eCAP can adapt pre-cache server responses (RESPMOD)
and pre-cache client requests (REQMOD). This covers 3xx responses going
from servers to Squid. In fact, the status code does not matter except
perhaps for control messages (1xx) that are not really "final responses"
anyway.

Squid does not support post-cache adaptation. If the 3xx response is
generated by Squid before going to the servers, then such response
cannot be currently adapted. Similarly, hits are not adapted. In most
cases post-cache adaptation is not needed so many proxies does not
support it. However, there are legitimate use cases such as ESI so we
should eventually add such support.

ICAP and eCAP can generate their own responses before Squid goes to the
servers. This is called REQMOD request satisfaction mode. I am guessing
this thread is not about that, so I will not detail the caveats for this
mode.

HTH,

Alex.
Received on Tue Nov 23 2010 - 23:05:32 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 24 2010 - 12:00:03 MST