]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix Expect header bug in curl_httpclient.py. 237/head
authorNeil Rahilly <neilrahilly@gmail.com>
Mon, 28 Mar 2011 15:11:04 +0000 (11:11 -0400)
committerNeil Rahilly <neilrahilly@gmail.com>
Mon, 28 Mar 2011 15:21:50 +0000 (11:21 -0400)
setopt, when used with HTTPHEADER, takes a list, not a string.

tornado/curl_httpclient.py

index 326e5499aa894cd97fda57594da5a660df386dbe..d925b1698d696df330957e4768d4da868e3e769d 100644 (file)
@@ -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)