Perfect! Thanks a ton! That was just the lead I needed. Did some more digging around and now I've got it running great. Next I just have to figure out SSL support :).<br><br>Thanks again!<br><br>Dave<br><br><br><br>
<div class="gmail_quote">On Tue, Jul 21, 2009 at 12:19 PM, Jean-Paul Calderone <span dir="ltr"><<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, 21 Jul 2009 11:44:43 -0500, dave fowler <<a href="mailto:davefowler@gmail.com">davefowler@gmail.com</a>> wrote:<br>
>Thanks for your help Jean-Paul.<br>
><br>
>In my example I've just subclassed the protocol and factory so I could print<br>
>out the properties and have a little control over things as I learn. The<br>
>proxy could of course be much easily run as<br>
><br>
> from twisted.web import http<br>
> f = http.HTTPFactory()<br>
> f.protocol = Proxy<br>
><br>
>I should be a bit more specific about what I'm currently confused about.<br>
><br>
>*I'm trying to find where I can grab the request URI from the client so I<br>
>can modify it from <a href="http://www.asdf.com.MYPROXYSITE.com" target="_blank">www.asdf.com.MYPROXYSITE.com</a> to <a href="http://www.asdf.com" target="_blank">www.asdf.com</a> before the<br>
>proxy client makes its requests. Where can you access and modify those<br>
</div>>parameters?*<br>
><br>
<br>
Proxy uses twisted.web.proxy.ProxyRequest as its request factory. The<br>
request will have its "process" method called when it has been completely<br>
received. You can subclass ProxyRequest, set your proxy to use that subclass<br>
as its request factory, and in that subclass, override process to change the<br>
uri before calling the base implementation. How's that?<br>
<div><div></div><div class="h5"><br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-web mailing list<br>
<a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
</div></div></blockquote></div><br>