Perlbal, Squid & X-Forwarded-For
ext-danga-lists at jope.net
Fri Jan 14 12:16:06 PST 2005
> Date: Thu, 13 Jan 2005 18:25:06 +0000
> From: Mike Whitaker <mike at altrion.org>
> Subject: Re: Perlbal, Squid & X-Forwarded-For
>> Would it be different to implement support for appending Perlbal's
>> client's IP to the X-F-F, and forwarding the entire thing? E.g. if
>> 18.104.22.168 is the client, and 10.0.0.1 is the squid, perlbal would
>> X-Forwarded-For: 22.214.171.124, 10.0.0.1
> IIRC, this is not the correct way - you should, unless my memory's at
> fault, have multiple X-Forwarded-For's in this case, most recent...
> erm, first I think :)
Either way -- commas-separated, or separate headers -- should be fine,
the comma-separated form is canonical.
RFC 2616, section 4.2:
Multiple message-header fields with the same field-name MAY be
present in a message if and only if the entire field-value for that
header field is defined as a comma-separated list [i.e., #(values)].
It MUST be possible to combine the multiple header fields into one
"field-name: field-value" pair, without changing the semantics of the
message, by appending each subsequent field-value to the first, each
separated by a comma. The order in which header fields with the same
field-name are received is therefore significant to the interpretation
of the combined field value, and thus a proxy MUST NOT change the
order of these field values when a message is forwarded.
More information about the perlbal