Now that you are up and running, some more information on what
you should be seeing.
When debugging HTTP applications, it is helpful to be able to
see all the traffic that goes back and forth. To assist with the
development of Apache
was created. Among other things it can act as a proxy, and in
the process it will capture, timestamp, and display all requests and
Python's urllib is protocol independent, and has
proxy support. Unfortunately, it's HTTP support is
limited, requiring wxAtomClient to frequently drop down to the
httplib. Fortunately, adding proxy support for HTTP is
def getConnection(server, port, verb, url, xml, headers):
url=urlparse.urljoin(('http://%s:%d' % (server,port)),url)
port=(len(proxy)>1) and int(proxy) or 80
conn = httplib.HTTPConnection(server,port)
conn.request(verb, url, xml, headers)
Independent of the monitoring usages, proxy support is a
valuable thing to have in an HTTP client.
Fun things to explore: the Save and Resend button. You can
even edit the request before resending. The Content-Length
header will automatically be adjusted.
Thanks Sam! I will roll this into the next release of the client code.
Sam Ruby has a quick-start guide for monitoring AtomAPI data transfer (or debugging anything else that uses http) with the tcpmon tool from Apache Axis. He also has a patch for Mark and Joe's API client which gives it proxy......
This probably isn't the right place for this rant, but the need to set up an OS environment variable with your HTTP Proxy address for the urllib class is just plain brain-dead. It should be a property of the class, or at very least a global variable in the HTTP module. I spent ages trying to figure out how to get urllib to work over a proxy, and came out of the experience baffled at the way it is meant to work. As far as I know there isn't a single other Python module that relies on some environment variable and I don't see why urllib is different.
Mark and Joe's prototype AtomAPI implementation in Python uses the low level httplib classes. This means that things like proxy support needs to be explicitly added. An alternative is to use the higher level urllib2 classes...
Redirected request in HttpWebRequest does not maintain specified method!
This appears to be a critical bug in the .NET Framework. Surely I am wrongthough! PLEASE HELP if anyone has any idea?Thanks,Jon________________________________From: Jon Davis [mailto:firstname.lastname@example.org]Sent: Friday, March 26, 2004 9:31 PMTo:...