[Twisted-Python] ReverseProxy Usage
David McCurley
David.McCurley at technologist.com
Wed Jul 16 17:19:07 MDT 2003
I assumed that if I put a reverse proxy resource in twisted, it would
reverse proxy to another site. It seems that it doesn't do fixups on
the returned html? So it won't really reverse proxy, it will just
scrape a single page from a remote site?
Or maybe I'm using it wrong?
Here is the scenarion:
I made a simple test resource file call "/tmp/t1.rpy" that has the
following code:
================
from twisted.web import resource, proxy
resource = proxy.ReverseProxyResource('www.google.com', 80, '/')
================
I used mktap to make a static resource (mktap web --path) that points to
/tmp. Now when I run it, I get a dir listing of /tmp. I click on
t1.rpy and that shows me the google home page.
However, the images don't work and none of the links work. They weren't
fixed up to have the "../t1.rpy" stuff prepended to them like I expected
and am used to with reverse proxies.
Can anyone clarify this for me?
Thanks!
More information about the Twisted-Python
mailing list