Fix for an Issue #152

This commit is contained in:
Miroslav Stampar
2012-08-20 10:41:43 +02:00
parent 59078bb1b8
commit 76338add17
3 changed files with 5 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ class HTTPHandler(urllib2.HTTPHandler):
if not req.headers.has_key('Content-length'):
req.headers['Content-length'] = '%d' % len(data)
else:
h.putrequest('GET', req.get_selector())
h.putrequest(req.get_method() or 'GET', req.get_selector())
if not req.headers.has_key('Connection'):
req.headers['Connection'] = 'keep-alive'