[Twisted-Python] HTTP 302 instead of just delivering the content.
markus at bluegap.ch
Mon Sep 11 08:35:44 EDT 2006
I'm using twisted-web on port 8083 and apache as a reverse proxy on port
80. I can connect to my domain on port 80 and the HTTP request gets
forwarded to twisted correctly. Twisted also replies and I get the website.
But as soon as I click a link, the 8083 port appears in the URL. And
according to tcpdump, it also got transfered via 8083. I figured Twisted
replied with the following (my real domain replaced by some 'x'):
HTTP/1.1 302 Found
Date: Mon, 11 Sep 2006 12:22:57 GMT
Content-type: text/html; charset=UTF-8
Why does it do that? The request sent was:
GET /firma HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:18.104.22.168)
Gecko/20060728 Firefox/22.214.171.124 (Debian-1.5.dfsg+126.96.36.199-4)
The apache2 reverse proxy configuration part is:
RewriteRule ^(.*)$ http://localhost:8083$1 [P]
Allow from all
How can I tell twisted to not only accept requests on port 8083, but
also serve those with Host: www.xxxxxxxxx.ch?
More information about the Twisted-Python