/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

merge bzr.dev r3564

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
52
51
 
53
52
    def _perform(self, request):
54
53
        """Send the request to the server and handles common errors.
133
132
 
134
133
    def _post(self, body_bytes):
135
134
        abspath = self._remote_path('.bzr/smart')
136
 
        response = self._perform(Request('POST', abspath, body_bytes))
 
135
        # We include 403 in accepted_errors so that send_http_smart_request can
 
136
        # handle a 403.  Otherwise a 403 causes an unhandled TransportError.
 
137
        response = self._perform(Request('POST', abspath, body_bytes,
 
138
                                         accepted_errors=[200, 403]))
137
139
        code = response.code
138
140
        data = handle_response(abspath, code, response.info(), response)
139
141
        return code, data