~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-10-26 08:08:23 UTC
  • mfrom: (5514.1.1 665100-content-type)
  • mto: This revision was merged to the branch mainline in revision 5516.
  • Revision ID: v.ladeuil+lp@free.fr-20101026080823-3wggo03b7cpn9908
Correctly set the Content-Type header when POSTing http requests

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