Skip to content

Commit

Permalink
fixed the usage some urllib.Request getters also on POST requests, se…
Browse files Browse the repository at this point in the history
…e commit 018f118 for further context (issue #2)
  • Loading branch information
wikier committed Nov 25, 2015
1 parent a655806 commit b1d2c32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion keepalive/keepalive.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ def _start_transaction(self, h, req):
try:
if req.data:
data = req.data
h.putrequest('POST', req.get_selector())
if hasattr(req, 'selector'):
h.putrequest('POST', req.selector)
else:
h.putrequest('POST', req.get_selector())
if not req.headers.has_key('Content-type'):
h.putheader('Content-type',
'application/x-www-form-urlencoded')
Expand Down

0 comments on commit b1d2c32

Please sign in to comment.