Unable to handle http code 403

Bug #57644 reported by Bob Tanner
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Vincent Ladeuil

Bug Description

Trying to pull the lastest bzr.dev using python 2.4.3 and bzr 0.9.0dev0 revision 1907

This is under XP Pro and cygwin

$ bzr pull
Using saved location: http://bazaar-ng.org/bzr/bzr.dev/
bzr: ERROR: Invalid http response for http://bazaar-vcs.org/bzr/bzr.dev/.bzr/branch-format: Unable to handle http code 403: expected 200 or 404 for full response.

My .bzr.log

this is a debug log for diagnosing/reporting problems in bzr
you can delete or truncate this file, or include sections in
bug reports to <email address hidden>

looking for plugins in /home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/plugins
add plugin name launchpad
Plugin name __init__ already loaded
Plugin name __init__ already loaded
load plugin (None, '/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/plugins/launchpad', ('', '', 5))
registered plugin command register-branch
loaded succesfully
looking for plugins in /home/tanner/.bazaar/plugins
encoding stdout as sys.stdout encoding 'US-ASCII'
converting os path '.' => url file:///home/tanner/projects/bazaar-ng/bzr.dev
opening working tree u'/home/tanner/projects/bazaar-ng/bzr.dev'
got branch format Bazaar-NG Metadir branch format 5
using pycurl libcurl/7.15.4 OpenSSL/0.9.8b zlib/1.2.3
trying to open 'http://bazaar-ng.org/bzr/bzr.dev/' with transport <bzrlib.transport.http._pycurl.PyCurlTransport url=http://bazaar-ng.org/bzr/bzr.dev/>
Traceback (most recent call last):
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/commands.py", line 697, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/commands.py", line 659, in run_bzr
    ret = run(*run_argv)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/commands.py", line 281, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/builtins.py", line 463, in run
    branch_from = Branch.open(location)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/branch.py", line 105, in open
    control = bzrdir.BzrDir.open(base, _unsupported)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/bzrdir.py", line 464, in open
    format = BzrDirFormat.find_format(t)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/bzrdir.py", line 962, in find_format
    return format.probe_transport(transport)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/bzrdir.py", line 972, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/transport/http/__init__.py", line 223, in get
    code, response_file = self._get(relpath, None)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/transport/http/_pycurl.py", line 115, in _get
    return self._get_full(relpath)
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/transport/http/_pycurl.py", line 155, in _get_full
    self._raise_curl_http_error(curl, 'expected 200 or 404 for full response.')
  File "/home/tanner/projects/bazaar-ng/bzr.dev/bzrlib/transport/http/_pycurl.py", line 195, in _raise_curl_http_error
    raise errors.InvalidHttpResponse(url, 'Unable to handle http code %d%s'
InvalidHttpResponse: Invalid http response for http://bazaar-vcs.org/bzr/bzr.dev/.bzr/branch-format: Unable to handle http code 403: expected 200 or 404 for full response.

return code 3

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 57644] Unable to handle http code 403

On Fri, 2006-08-25 at 01:17 +0000, tanner wrote:
> Public bug reported:
>
> Trying to pull the lastest bzr.dev using python 2.4.3 and bzr 0.9.0dev0
> revision 1907
>
> This is under XP Pro and cygwin

bazaar-vcs.org has just suffered a hardware failure - thats why you are
getting an error.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
John A Meinel (jameinel) wrote :

When using pycurl, a 403 is just treated as an error code that we should never get. Certainly we could format a nicer error declaring that we got '403 Forbidden' and print out the url that failed.

Probably we are doing everything correct, except that we are printing "Unable to handle http code". We are actually handling it by reporting it to the user, along with the url.

Changed in bzr:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

I need some modifications already done in ~bzr/bzr/bzr.urllib.keepalive branch to write the tests, so I'll fix it there.

Changed in bzr:
assignee: nobody → v-ladeuil
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :

Fixed in branch ~bzr/bzr/bzr.urllib.keepalive

Revision history for this message
Vincent Ladeuil (vila) wrote :

New target 0.13

Changed in bzr:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.