W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2011

Re: I-D draft-petersson-forwarded-for-00.txt

From: Matt Domsch <Matt_Domsch@dell.com>
Date: Thu, 7 Apr 2011 09:43:19 -0500
To: Karl Dubost <karld@opera.com>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Andreas Petersson <andreas@sbin.se>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <20110407144318.GA19980@pws490.domsch.com>
On Thu, Apr 07, 2011 at 07:34:10AM -0500, Karl Dubost wrote:
> Le 7 avr. 2011 à 08:24, Poul-Henning Kamp a écrit :
> > In message <2962611A-EC8C-490C-BA3F-FB96D596B38D@opera.com>, Karl Dubost writes:
> > 
> >> X-Forwarded-For is used by Opera Mini servers. What about others?
> > 
> > I thought the objective here was to define a replacement for X-Forwarded-For ?
> Yup. Sorry for not being clear. 
> Are there other products/companies using X-Forwarded-For?
> What are the products emitting the header?

Apache mod_proxy emits the header, at least when used as a reverse proxy (front end for web applications).

> What are the products parsing the header? (libraries, etc)
> What are the usual mistakes, errors, etc we might have to face when parsing this header?

My MirrorManager app parses this header to retrieve the originating
client's IP address, to perform GeoIP lookups thereof.  The python
code is really simple though:

    return xforwardedfor.split(',')[-1].strip()

The resultant string is fed to the python-IPy library.  This library
does not (currently) handle brackets in IPv6 addresses.


Matt Domsch
Technology Strategist, Dell Office of the CTO
Received on Thursday, 7 April 2011 14:43:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:13:51 UTC