Uploading an image using PUT

2008-07-16 Thread noelob
ion: conn = httplib.HTTPConnection(url) conn.request(method, uriStr, body, additionalHeaders) where: method = PUT uriStr is the web app specific URI body is the raw data (bytes) from the jpg image additionalHeaders are the headers above For some reason I keep getting a Status 400 error from th

Re: Uploading an image using PUT

2008-07-23 Thread noelob
Hi All, I finally figured it out, thanks to Wireshark! I was adding my own "Content-Length: 50173" header to the request, but httplib appears to add its own header (also "Content-Length: 50173") which must have been causing a conflict and making the sever return "HTTP/1.1 400 Bad Request\r\n". As s

BadStatusLine:

2008-09-22 Thread noelob
Hi All, During performance testing of my web application, I occasionally get a BadStatusLine exception from httplib. Reading http://docs.python.org/lib/module-httplib.html#l2h-4021 tells me that it's "Raised if a server responds with a HTTP status code that we don't understand." Is there a way to