~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-11-30 17:48:41 UTC
  • mfrom: (3052.3.4 172701)
  • mto: This revision was merged to the branch mainline in revision 3060.
  • Revision ID: v.ladeuil+lp@free.fr-20071130174841-6yitg1imn504sttr
Fix bug #172701 by catching the pycurl ShortReadvError and allowing readv to issue several get requests

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib import (
22
22
    errors,
 
23
    trace,
23
24
    urlutils,
24
25
    )
25
 
from bzrlib.trace import mutter
26
 
from bzrlib.transport.http import HttpTransportBase
 
26
from bzrlib.transport import http
27
27
# TODO: handle_response should be integrated into the _urllib2_wrappers
28
28
from bzrlib.transport.http.response import handle_response
29
29
from bzrlib.transport.http._urllib2_wrappers import (
32
32
    )
33
33
 
34
34
 
35
 
class HttpTransport_urllib(HttpTransportBase):
 
35
class HttpTransport_urllib(http.HttpTransportBase):
36
36
    """Python urllib transport for http and https."""
37
37
 
38
38
    # In order to debug we have to issue our traces in sync with
85
85
        request.auth = auth
86
86
        request.proxy_auth = proxy_auth
87
87
 
88
 
        mutter('%s: [%s]' % (request.method, request.get_full_url()))
89
88
        if self._debuglevel > 0:
90
89
            print 'perform: %s base: %s, url: %s' % (request.method, self.base,
91
90
                                                     request.get_full_url())
108
107
                                           qual_proto=self._scheme)
109
108
 
110
109
        if request.redirected_to is not None:
111
 
            mutter('redirected from: %s to: %s' % (request.get_full_url(),
112
 
                                                   request.redirected_to))
 
110
            trace.mutter('redirected from: %s to: %s' % (request.get_full_url(),
 
111
                                                         request.redirected_to))
113
112
 
114
113
        return response
115
114