Skip to content

Commit

Permalink
Merge 8ef2a84 into 446d2e6
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Jul 16, 2014
2 parents 446d2e6 + 8ef2a84 commit d5acc61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tornado/curl_httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,12 @@ def _curl_setup_request(curl, request, buffer, headers):
% request.method)

request_buffer = BytesIO(utf8(request.body))
def ioctl(cmd):
if cmd == curl.IOCMD_RESTARTREAD:
request_buffer.seek(0)
curl.setopt(pycurl.READFUNCTION, request_buffer.read)
curl.setopt(pycurl.IOCTLFUNCTION, ioctl)
if request.method == "POST":
def ioctl(cmd):
if cmd == curl.IOCMD_RESTARTREAD:
request_buffer.seek(0)
curl.setopt(pycurl.IOCTLFUNCTION, ioctl)
curl.setopt(pycurl.POSTFIELDSIZE, len(request.body))
else:
curl.setopt(pycurl.INFILESIZE, len(request.body))
Expand Down

0 comments on commit d5acc61

Please sign in to comment.