~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-08-25 19:06:49 UTC
  • mfrom: (1.1.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825190649-pq87jonr4uvs7s0y
Tags: 1.6-1
New upstream release.

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