facebook/tornado — pull request #1051 by moijes12 (2014-05-10 19:26:46+00:00)
Title: Fix for ticket #904 - Addition of get_claimed_ip() to HTTPRequest

As per ticket description of ticket #904, a method to return the first
public IP address from X-Forwarded-For should be implemented. This
update contains the below changes:

1. In tornado/httpserver.py
HTTPRequest.get_claimed_ip() is implemented which simply returns
remote_ip

2. In tornado/test/httpserver_test.py
The test for verifying ip_headers already existed in XHeaders. I simply
modified the internal class Handler to retrieve the output of
get_claimed_ip from the request messge and write it to the dictionary.
The same tests that were written for verifying ip_headers have been
re-used except that they now check that remote ip equals claimed_ip