[Twisted-Python] [Tutor] Help on personnal Proxy
POYEN OP Olivier (DCL)
Olivier.POYEN at clf-dexia.com
Tue May 27 03:54:45 MDT 2003
> The short answer to your question is to replace:
>
> f.HTTPChannel=proxy.Proxy
>
> with:
>
> f.protocol=proxy.Proxy
>
Can I stress that f.HTTPChannel comes from the docstring from the Proxy Class in the proxy.py file from Twisted.
If this is the "official" way to do, maybe should someone change the docstring....
Anyway.
When doing so, I have some trouble with the "as-is" proxy.
Some exceptions occured:
My current parameters are :
Twisted 1.0.5 for python 2.2
export http_proxy='http://localhost:8765' # for the proxy
And the current web server is running on localhost:8080
The issue is that, when doing a 'wget http://localhost:8080', in web.proxy.py, there is, at line 113
host,port= string.split
Thus, port became a string.
And in internet.tcp.py, there is a test for isInstance(port,StringTypes), which matches.....
With a single port=int(port) before calling reactor.connectTcP in web.prxoy, ezverything works.
Am I dead wrong ?
> Or, I've written a (yet another) web proxy that you might
> want to try too. Using my MinProxy ....
>
I'll gladly have a look !
Thanks !
OPQ
-------------- next part --------------
-----------------------------------------------------------------
Ce message est confidentiel ; son contenu ne represente en aucun
cas un engagement de la part de Dexia Credit Local ou de Dexia
CLF Banque. Toute publication, utilisation ou diffusion, meme
partielle, doit etre autorisee prealablement par l'emetteur. Si
vous n'etes pas destinataire de ce message, merci d'en avertir
immediatement l'expediteur.
This message is confidential ; its contents do not constitute a
commitment by Dexia Credit Local or Dexia CLF Banque. Any
unauthorised disclosure, use or dissemination, either whole or
partial, is prohibited. If you are not the intended recipient of
the message, please notify the sender immediately.
-----------------------------------------------------------------
Consultez notre site internet www.dexia-clf.fr
La cle d'une gestion optimisee du secteur public local
-----------------------------------------------------------------
More information about the Twisted-Python
mailing list