andrea at cpushare.com
Thu Jan 19 14:29:34 MST 2006
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?
> As far as I know twisted.web.proxy.ReverseProxyResource doesn't send
> X-Forwarded-For. I don't think Apache2 sends the port. I'm not sure
> what to do about this other than subclass and fix, it seems like a
> pretty special case to me, perhaps security would be better provided
> through another means, because as you said, it only works if the
> connection tracking is logged. Which most SOHO devices don't do.
There are large ISP that I assume log the stuff properly.
> >3) if answer to 2 is no, can I forward port to web2 my simple hack to
> >twisted.web that I need in order to plug klive on top twisted.web2?
> Twisted.web2 is backwards compatible, in that it knows what a
> twisted.web resource expects, and is capable of translating them from
> what Twisted.web2 uses (see twisted.web2.compat) You should be able to
> just drop that exact ReverseProxyResource into a twisted.web2 tree and
> have it work. (While you're at it you might as well patch it to send
> the client via X-Forwarded-For (and send the other headers
> AutoURIRewrite expects while you're at it))
Ok, it may take a bit of time since I'm not ready to move on top of web2
yet, but I'll start testing, I've to fix this anyway before I can move
on top of web2.
> 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?
> 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?
More information about the Twisted-web