HTTP Debugging Proxy

Discussion in 'Python' started by Fuzzyman, Jul 21, 2004.

  1. Fuzzyman

    Fuzzyman Guest

    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/atlantibots/pythonutils.html
     
    Fuzzyman, Jul 21, 2004
    #1
    1. Advertising

  2. Fuzzyman

    Alan Kennedy Guest

    [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
     
    Alan Kennedy, Jul 21, 2004
    #2
    1. Advertising

  3. > 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.
     
    Kevin Dahlhausen, Jul 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vidy5300
    Replies:
    0
    Views:
    914
    vidy5300
    Jun 7, 2004
  2. Replies:
    0
    Views:
    1,666
  3. Karsten Wutzke
    Replies:
    1
    Views:
    916
    Steven Simpson
    Aug 20, 2007
  4. nntp
    Replies:
    12
    Views:
    396
    Joe Smith
    Oct 23, 2004
  5. Greg
    Replies:
    4
    Views:
    335
    Steven Simpson
    Aug 16, 2012
Loading...

Share This Page