[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2009-03-23 Thread Jason Davies
Jason Davies added the comment: Note: in case I didn't make it clear, the fix is to remove the offending try/except handler and let the broken pipe error propagate. -- ___ Python tracker <http://bugs.python.org/i

[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2009-03-23 Thread Jason Davies
New submission from Jason Davies : I came across this bug when trying to use CouchDB-Python to PUT an attachment using HTTP authentication (using the httplib2 library). Essentially what httplib2 does is this: 1. Attempt PUT with no auth credentials 2. If a 401 response is received, try again