~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-07-13 19:58:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060713195822-965e2c4422506a75
cleanup pass, allow pycurl connections to be shared between transports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
    # TODO: Implement pipelined versions of all of the *_multi() functions.
50
50
 
51
 
    def __init__(self, base):
 
51
    def __init__(self, base, from_transport=None):
52
52
        """Set the base path where files will be stored."""
53
53
        super(HttpTransport_urllib, self).__init__(base)
 
54
        # HttpTransport_urllib doesn't maintain any per-transport state yet
 
55
        # so nothing to do with from_transport
54
56
 
55
57
    def _get(self, relpath, ranges, tail_amount=0):
56
58
        path = relpath
91
93
        request.add_header('User-Agent', 'bzr/%s (urllib)' % bzrlib.__version__)
92
94
        if ranges or tail_amount:
93
95
            request.add_header('Range', self.range_header(ranges, tail_amount))
94
 
        mutter("GET %s [%s]" % (url, request.get_header('Range')))
95
96
        response = opener.open(request)
96
97
        return response
97
98