~lifeless/bzr/index.range_map

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2008-06-19 01:17:19 UTC
  • mfrom: (3218.1.277 +trunk)
  • Revision ID: robertc@robertcollins.net-20080619011719-1c4g4uxzzhdls2wf
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
            self._opener = _from_transport._opener
49
49
        else:
50
50
            self._opener = self._opener_class()
 
51
        self._remote_is_at_least_1_2 = True
51
52
 
52
53
    def _perform(self, request):
53
54
        """Send the request to the server and handles common errors.
132
133
 
133
134
    def _post(self, body_bytes):
134
135
        abspath = self._remote_path('.bzr/smart')
135
 
        response = self._perform(Request('POST', abspath, body_bytes))
 
136
        # We include 403 in accepted_errors so that send_http_smart_request can
 
137
        # handle a 403.  Otherwise a 403 causes an unhandled TransportError.
 
138
        response = self._perform(Request('POST', abspath, body_bytes,
 
139
                                         accepted_errors=[200, 403]))
136
140
        code = response.code
137
141
        data = handle_response(abspath, code, response.info(), response)
138
142
        return code, data