From: Neil Rahilly Date: Mon, 28 Mar 2011 15:11:04 +0000 (-0400) Subject: Fix Expect header bug in curl_httpclient.py. X-Git-Tag: v2.0.0~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F237%2Fhead;p=thirdparty%2Ftornado.git Fix Expect header bug in curl_httpclient.py. setopt, when used with HTTPHEADER, takes a list, not a string. --- diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index 326e5499a..d925b1698 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -297,7 +297,7 @@ def _curl_setup_request(curl, request, buffer, headers): # so just turn off the feature (yes, setting Expect: to an empty # value is the official way to disable this) if "Expect" not in request.headers: - curl.setopt(pycurl.HTTPHEADER, utf8("Expect: ")) + curl.setopt(pycurl.HTTPHEADER, [utf8("Expect: ")]) if request.header_callback: curl.setopt(pycurl.HEADERFUNCTION, request.header_callback)