~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-07-19 14:17:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060719141749-5c8a2a433f966f29
Update _extract_headers, make it less generic, and non recursive.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
# It's probably safer to just always revalidate.  mbp 20060321
25
25
 
26
26
import os
27
 
from StringIO import StringIO
 
27
from cStringIO import StringIO
28
28
 
29
29
from bzrlib import errors
30
30
import bzrlib
34
34
from bzrlib.trace import mutter
35
35
from bzrlib.transport import register_urlparse_netloc_protocol
36
36
from bzrlib.transport.http import (HttpTransportBase, HttpServer,
37
 
                                   response, _extract_headers,
38
 
                                   _pycurl_errors)
 
37
                                   _extract_headers,
 
38
                                   response, _pycurl_errors)
39
39
 
40
40
try:
41
41
    import pycurl
175
175
 
176
176
        code = curl.getinfo(pycurl.HTTP_CODE)
177
177
        # mutter('url: %s header:\n%s', abspath, header.getvalue())
178
 
        headers = _extract_headers(header, skip_first=True)
 
178
        headers = _extract_headers(header.getvalue(), abspath)
179
179
        # handle_response will raise NoSuchFile, etc based on the response code
180
180
        return code, response.handle_response(abspath, code, headers, data)
181
181