RE: [Twisted-Python] [Tutor] Help on personnal Proxy
![](https://secure.gravatar.com/avatar/8a22c5e765f3a07030458f0a9fad969a.jpg?s=120&d=mm&r=g)
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 ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (1)
-
POYEN OP Olivier (DCL)