[Twisted-Python] Ramblings about creating URLs in Twisted Web

Donovan Preston dp at twistedmatrix.com
Sat Jun 28 18:03:59 MDT 2003


On Saturday, June 28, 2003, at 3:18PM, Itamar Shtull-Trauring wrote:
>
> One way to do reverse proxying that works correctly is to use what Zope
> calls VirtualHostMonster - you pass the real domain and path as part of
> a rewritten Zope server and it extracts them and mangles the reqyest
> correctly.

> Twisted currently supports this for domains (though not paths, the code
> needs to be extended) using some code which is in twisted.web.vhost
> IIRC. twisted-web does this out of the box, so you can do:

<snip>

Yes, I am aware of twisted.web.vhost and this is simply a slight 
variation on the ProxyPass method I was discussing in my post. I am 
suggesting that whatever code in Twisted which is responsible for 
generating URLPath instances (a method on the request, perhaps) be 
aware of this and handle it properly, isolating the Woven programmer 
from the details of the configuration of the web server.

Incidentally, if Apache sets the x-forwarded-host header upon 
requesting the page from the proxy, why is it necessary to pass this 
information on to the proxy as a part of the url?

dp





More information about the Twisted-Python mailing list