~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib.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:
138
138
        abspath = self._remote_path('.bzr/smart')
139
139
        # We include 403 in accepted_errors so that send_http_smart_request can
140
140
        # handle a 403.  Otherwise a 403 causes an unhandled TransportError.
141
 
        response = self._perform(Request('POST', abspath, body_bytes,
142
 
                                         accepted_errors=[200, 403]))
 
141
        response = self._perform(
 
142
            Request('POST', abspath, body_bytes,
 
143
                    {'Content-Type': 'application/octet-stream'},
 
144
                    accepted_errors=[200, 403]))
143
145
        code = response.code
144
146
        data = handle_response(abspath, code, response.info(), response)
145
147
        return code, data