~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: 2009-02-05 11:00:39 UTC
  • mfrom: (3982.1.1 bzr.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090205110039-w9oelsyvyx160qwy
(vila) Progress bar at socket level for http

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        if _from_transport is not None:
48
48
            self._opener = _from_transport._opener
49
49
        else:
50
 
            self._opener = self._opener_class()
 
50
            self._opener = self._opener_class(
 
51
                report_activity=self._report_activity)
51
52
 
52
53
    def _perform(self, request):
53
54
        """Send the request to the server and handles common errors.
100
101
 
101
102
    def _get(self, relpath, offsets, tail_amount=0):
102
103
        """See HttpTransport._get"""
103
 
 
104
104
        abspath = self._remote_path(relpath)
105
105
        headers = {}
106
106
        accepted_errors = [200, 404]
126
126
            raise errors.InvalidHttpRange(abspath, range_header,
127
127
                                          'Server return code %d' % code)
128
128
 
129
 
        data = handle_response(abspath, code, response.info(), response,
130
 
            report_activity=self._report_activity)
 
129
        data = handle_response(abspath, code, response.info(), response)
131
130
        return code, data
132
131
 
133
132
    def _post(self, body_bytes):
137
136
        response = self._perform(Request('POST', abspath, body_bytes,
138
137
                                         accepted_errors=[200, 403]))
139
138
        code = response.code
140
 
        data = handle_response(abspath, code, response.info(), response,
141
 
            report_activity=self._report_activity)
 
139
        data = handle_response(abspath, code, response.info(), response)
142
140
        return code, data
143
141
 
144
142
    def _head(self, relpath):