Commits

Anonymous committed 425c7d8

make sure headers are correctly set.

  • Participants
  • Parent commits 9fe7465

Comments (0)

Files changed (1)

File restclient/transport.py

                 c.setopt(pycurl.USERPWD, userpass)
             #.setopt(pycurl.VERBOSE, 1)
 
-            if headers:
-                c.setopt(pycurl.HTTPHEADER,
-                        ["%s: %s" % pair for pair in sorted(headers.iteritems())])
+            
 
 
             # set method
                     c.setopt(pycurl.POSTFIELDSIZE, content_length)
                 c.setopt(pycurl.READFUNCTION, content.read)
             
+            if headers:
+                c.setopt(pycurl.HTTPHEADER,
+                        ["%s: %s" % pair for pair in sorted(headers.iteritems())])
+
             try:
                 c.perform()
             except pycurl.error, e: