diff options
author | filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-08-31 02:16:00 +0000 |
---|---|---|
committer | filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-08-31 02:16:00 +0000 |
commit | aa40e99d97eebe62d174fcbbc0447c3ec979b48a (patch) | |
tree | 51eaaf2e5292cb72f6aa944b99596c19f3f949b0 /lib/mongrel.rb | |
parent | 417a9131e7bd9f02547f371d737b2ff91b4c1d74 (diff) | |
download | unicorn-aa40e99d97eebe62d174fcbbc0447c3ec979b48a.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@580 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel.rb')
-rw-r--r-- | lib/mongrel.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb index aac2369..ef85e97 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -608,7 +608,13 @@ module Mongrel if handlers params[Const::PATH_INFO] = path_info params[Const::SCRIPT_NAME] = script_name - params[Const::REMOTE_ADDR] = params[Const::HTTP_X_FORWARDED_FOR] || client.peeraddr.last + # From http://www.ietf.org/rfc/rfc3875 : + # "Script authors should be aware that the REMOTE_ADDR and REMOTE_HOST + # meta-variables (see sections 4.1.8 and 4.1.9) may not identify the + # ultimate source of the request. They identify the client for the + # immediate request to the server; that client may be a proxy, gateway, + # or other intermediary acting on behalf of the actual source client." + params[Const::REMOTE_ADDR] = client.peeraddr.last # select handlers that want more detailed request notification notifiers = handlers.select { |h| h.request_notify } |