[Catalyst-dev] [RFC] which one is the client ip in X-Forwarded-For?
islue
islue at 126.com
Sun Jul 30 19:11:33 CEST 2006
Excuse me, but is there anyone caring the topic?
-----ÔʼÓʼþ-----
·¢¼þÈË:"islue"
·¢ËÍʱ¼ä:2006-07-01 01:34:22
ÊÕ¼þÈË:catalyst-dev at lists.rawmode.org
³ËÍ:(ÎÞ)
Ö÷Ìâ:[Catalyst-dev] [RFC] which one is the client ip in X-Forwarded-For?
From doc of Catalyst:
$c->req->address is set to the user's real IP address, as read from the HTTP X-Forwarded-For header.
From code of Catalyst::Engine::CGI/Apache:
Select the most recent upstream IP (last in the list)
Some substance in RFC:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
[quote]
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.
[/quote]
In my situation, the client ip appears at the head instead of the last
in the list. At least, it is the behavior of the proxy server I used.
I know, it is not a standard http header field. But if the proxy server
obey the rfc, the client ip should be the first one, isn't it?
Would the group change behaviour at the point, or I should hack it for
my own situation?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst-dev/attachments/20060731/38f8fddf/attachment.htm
More information about the Catalyst-dev
mailing list