Re: Query regarding HTTP Request

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 09 Apr 2012 18:07:34 -0600

On 04/09/2012 08:00 AM, Vinayak Samak wrote:

> In SQUID 2.6 there is option to replace http header (header_replace).
> So is there any specific reason header_add is not present in squid.conf
> to add missing / absent http header keys in header of http request?

Hello Vinayak,

    There are options to add various semi-standard headers such as
X-Forwarded-For. More such options/headers can be added if needed.

For really custom headers, constant (i.e., hard-coded in squid.conf)
values and "always-add" behavior is usually not sufficient because most
applications require the values to be computed for each transaction,
received values to be deleted or appended to, etc. Most users start with
a constant header idea but eventually realize that they would be better
off with adding custom headers using ICAP or eCAP interfaces, where they
can implement header-specific logic.

Said that, the demand for a generic option to add a custom header never
goes away so I suspect it will eventually be added. If you would like to
work on the corresponding source code changes, please say so and I will
post some related notes that you can use as a starting point.

HTH,

Alex.
Received on Tue Apr 10 2012 - 00:07:42 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 10 2012 - 12:00:04 MDT