470,613 Members | 2,362 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

HTTP Debugging Proxy

Xavier Defrang has written an HTTP Debugging Proxy.
This message is basically for him - since he says on his website that
he inhabits this newsgroup.

I downloaded this and ran it , with the following result :

Traceback (most recent call last):
File "D:\Python Projects\cgiproxy\http_debugging_proxy.py", line 34,
in ?
signal.signal(signal.SIGALRM, SIGALRM_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'

Is this my fault or yours ? :-)
I am in a restricted internet environment and have to use an external
CGI proxy to get unrestricted access. I would like to write a little
server that will run on my machine (client) and transparently modify
standard http requests to go via the CGI proxy....

My knowledge of http and tcp/ip protocols is little but growing... so
this should be an interesting exercise - if I can get it off the
ground at all.

My other problem is that my restricted internet access is already via
proxy - so I need to get the server to use that proxy and my browser
via my little serevr..... *sigh* (so merely changing the settings in
IE isn't enough - because then urllib2 and it's ilk won't correctly
pick up the squid proxy settings to make valid conenctions).

Regards,

Fuzzy

http://www.voidpsace.org.uk/atlantib...thonutils.html
Jul 18 '05 #1
2 5455
[Fuzzyman]
Xavier Defrang has written an HTTP Debugging Proxy.
This message is basically for him - since he says on his website that
he inhabits this newsgroup.

I downloaded this and ran it , with the following result :

Traceback (most recent call last):
File "D:\Python Projects\cgiproxy\http_debugging_proxy.py", line 34,
in ?
signal.signal(signal.SIGALRM, SIGALRM_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'

Is this my fault or yours ? :-)


Yours, for trying to use Unix-only facilities on Windows :-)

The documentation page for the signal module is not very clear about
this point, probably because there are plenty of exclusions on
different platforms, and documenting them all explicitly would
over-complicate the documentation.

There is a hint on the docs for the signal.alarm() function, which
says "Availability: Unix". IIRC, the code signal.alarm(func) is just a
wrapper around the code signal.signal(signal.SIGALRM, func).

http://docs.python.org/lib/module-signal.html

Perhaps the platform independent "Timer" object can give you what you
need?

http://docs.python.org/lib/timer-objects.html

regards,

--
alan kennedy
------------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/contact/alan
Jul 18 '05 #2
> Yours, for trying to use Unix-only facilities on Windows :-)
There is a proxy called 'TCPWatch' written in python that works under
windows and is useful for debugging.
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Timothy Alvis | last post: by
3 posts views Thread by bd-chan | last post: by
reply views Thread by Dan Lenski | last post: by
reply views Thread by swigerb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.