should interpret http 405 "not allowed" as "no smart server here" - breaks foreign branches on google code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
>> Le mercredi 16 décembre 2009 à 00:52 +0200, Alexander Belchenko a
>> écrit :
>> > bzr branch https:/
>>
>> Unfortunately this doesn't actually appear to work. We have a similar
>> problem with bzr-hg against Google code as we have for bzr-svn: Google
>> will return an error 405 when bzr attempts to access
>> .bzr/branch-format.
405 is 'not allowed', which is imo (without rereading the spec) a reasonable thing for an http server to do if it doesn't want to let you post to that url. We should probably cleanly handle that as "no smart server here?"
---
% bzr -Derror log https:/
bzr: ERROR: bzrlib.
Traceback (most recent call last):
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
revision, file_list)
File "/usr/lib/
tree, b, path = bzrdir.
File "/usr/lib/
bzrdir, relpath = klass.open_
File "/usr/lib/
return BzrDir.
File "/usr/lib/
result = BzrDir.
File "/usr/lib/
redirected)
File "/usr/lib/
return action(transport)
File "/usr/lib/
transport, _server_
File "/usr/lib/
return format.
File "/usr/lib/
format_string = transport.
File "/usr/lib/
f = self.get(relpath)
File "/usr/lib/
code, response_file = self._get(relpath, None)
File "/usr/lib/
return self._get_
File "/usr/lib/
curl, 'expected 200 or 404 for full response.')
File "/usr/lib/
url, 'Unable to handle http code %d%s' % (code,msg))
InvalidHttpResp
Related branches
- Vincent Ladeuil: Needs Information
- John A Meinel: Approve
-
Diff: 237 lines (+104/-31)5 files modifiedNEWS (+8/-0)
bzrlib/bzrdir.py (+1/-1)
bzrlib/tests/__init__.py (+1/-0)
bzrlib/transport/http/__init__.py (+58/-1)
bzrlib/transport/http/_pycurl.py (+36/-29)
description: | updated |
description: | updated |
Changed in bzr: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr: | |
assignee: | Jelmer Vernooij (jelmer) → nobody |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
http:// www.w3. org/Protocols/ rfc2616/ rfc2616- sec10.html# sec10.4. 6
> 10.4.6 405 Method Not Allowed
>
> The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.
istm this would be reasonable to treat as TransportNotPos sible, making sure that error includes the method and url. You might expect to get this on a post but in fact google seems to also serve it for a GET on an unexpected url.