~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_pycurl.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-10-26 07:02:31 UTC
  • mfrom: (5514.1.1 665100-content-type)
  • Revision ID: pqm@pqm.ubuntu.com-20101026070231-xn5fwikevh6q40qu
(vila) Correctly set the Content-Type header when POSTing http requests.
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
        # We override the Expect: header so that pycurl will send the POST
269
269
        # body immediately.
270
270
        try:
271
 
            self._curl_perform(curl, header, ['Expect: '])
 
271
            self._curl_perform(curl, header,
 
272
                               ['Expect: ',
 
273
                                'Content-Type: application/octet-stream'])
272
274
        except pycurl.error, e:
273
275
            if e[0] == CURLE_SEND_ERROR:
274
276
                # When talking to an HTTP/1.0 server, getting a 400+ error code