Comment 1 for bug 812137

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: pycurl and bzr-svn breaks branching from https://launchpad.net/bzr

Not sure whether this is a bug in bzr or bzr-svn (or pycurl maybe), but the problem is that bzr-svn sets pycurl.CUSTOMREQUEST and nothing unsets it before doing the next GET request. For example, the following patch solves the problem.

=== modified file '__init__.py'
--- __init__.py 2011-06-12 20:30:12 +0000
+++ __init__.py 2011-07-18 07:12:44 +0000
@@ -206,6 +206,7 @@
                 conn.setopt(pycurl.WRITEFUNCTION, data.write)
                 transport._curl_perform(conn, header)
                 code = conn.getinfo(pycurl.HTTP_CODE)
+ conn.unsetopt(pycurl.CUSTOMREQUEST)
                 if code == 404:
                     raise NoSuchFile(transport._path)
                 if code in (403, 405):