/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 tools/http_client.py

Better connection sharing by using only one curl object.

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport.__init__, PyCurlTransport.has,
PyCurlTransport._get_full): Use only one curl object.
(PyCurlTransport._get_ranged): Use only one curl object. Specify
'Range' as an additional header.
(PyCurlTransport._curl_perform): Take additional headers into
account.
(PyCurlTransport._set_curl_options): Leave _perform do the header
setting.
(PyCurlTransport._curl_perform): Set all headers just before
issuing the request.

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
        debug("can't handle response status %r" % r.status)
236
236
        raise NotImplementedError()
237
237
 
238
 
    if r.content_length == None:
 
238
    if r.content_length is None:
239
239
        raise NotImplementedError()
240
240
 
241
241
    if r.content_length == 0: