twisted.web2.vhost and X-Forwarded-For (was Re: [Twisted-web]
dreid at dreid.org
Thu Jan 19 14:59:28 MST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Andrea Arcangeli wrote:
> On Thu, Jan 19, 2006 at 09:24:01AM -0800, David Reid wrote:
>> Judging from the way Request actually deals with .uri it should be _uri,
>> I'll discuss this with foom and fix it later.
> So you mean, it should be private? But then how can the vhost fixup the
> uri if it's private?
well uri actually gets parsed out to all the things that VHostURIRewrite
assigns to. What is more likely to happen in the next few days is
request.uri will become a URI object and req.path, req.scheme, req.host,
req.port etc will all be provided instead by req.uri.scheme etc ...
This way assigning something to req.uri will make sense and actually
affect things. Currently nothing important actually happens if you
assign to request.uri (because by the time we get to user code we've
already parsed out all the useful bits)
> There are large ISP that I assume log the stuff properly.
You know what they say about assumptions. :)
>> I'm not sure if tacking a :port onto the X-Forwarded-For header will
>> break other http servers.
> I don't know. Should I use a x-forwarded-port instead?
probably X-Forwarded-For-Port or something. I'm not sure, I was kinda
hoping someone else could give some input.
>> Send me a patch (on or offlist) that changes chanRequest to _chanRequest
> What do you mean exactly with ? And why only one "_" I thought two __
> were needed to make it private. Or you want it only as an hint?
 indicates a footnote, which could be found after my name (I probably
put it before my name it was meant to indicate that you should read the
Twisted coding standards and that this document would explain why '_'
instead of '__'.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Twisted-web