Error with WebDAV requiring http authentication
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar WebDAV plugin |
Triaged
|
Medium
|
Unassigned |
Bug Description
Related to: #72792
bzr 1.8
webdav 1.6.0
python 2.5
pycurl 7.16.4
bzr init-repo http+webdav:
gives me:
bzr: ERROR: Invalid http response for http://<urlToRepo>: Unable to handle http code 401: Authorization Required
bzr init-repo http+webdav:
gives me:
bzr: ERROR: http://<urlToRepo> is permanently redirected to http://<urlToRepo/
I've tried supplying the authentication details in authentication.
Here's the debug for:
bzr init-repo http+webdav:
0.032 encoding stdout as sys.stdout encoding 'UTF-8'
0.033 bzr arguments: [u'init-repo', u'http+
0.033 looking for plugins in /home/dmuir/
0.036 looking for plugins in /usr/lib/
0.036 Plugin name __init__ already loaded
0.037 Plugin name __init__ already loaded
0.084 encoding stdout as sys.stdout encoding 'UTF-8'
0.664 Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
to_
File "/usr/lib/
self.mkdir('.')
File "/home/
response = self._perform(
File "/usr/lib/
response = self._opener.
File "/usr/lib/
response = meth(req, response)
File "/usr/lib/
code, msg, hdrs)
File "/usr/lib/
return self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
% (code, msg))
InvalidHttpResp
0.664 return code 3
Here's the debug log for:
bzr init-repo http+webdav:
0.016 encoding stdout as sys.stdout encoding 'UTF-8'
0.017 bzr arguments: [u'init-repo', u'-Dhttp', u'http+
0.017 looking for plugins in /home/dmuir/
0.021 looking for plugins in /usr/lib/
0.021 Plugin name __init__ already loaded
0.021 Plugin name __init__ already loaded
0.070 encoding stdout as sys.stdout encoding 'UTF-8'
0.095 * About to connect() to bzr.tekika.com:80
0.506 > MKCOL /edval
0.506 > Host: bzr.tekika.com
> Accept: */*
> User-Agent: bzr/1.8 (urllib)
> Connection: Keep-Alive
> Pragma: no-cache
> Cache-Control: max-age=0
0.757 < HTTP/1.1 401 Authorization Required
0.758 < Date: Thu, 06 Nov 2008 06:29:35 GMT
< Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 Phusion_
< WWW-Authenticate: Basic realm="Edval Area"
< Vary: Accept-Encoding
< Content-Length: 520
< Keep-Alive: timeout=2, max=100
< Connection: Keep-Alive
< Content-Type: text/html; charset=iso-8859-1
0.759 > MKCOL /edval
0.760 > Host: bzr.tekika.com
> Accept: */*
> User-Agent: bzr/1.8 (urllib)
> Connection: Keep-Alive
> Pragma: no-cache
> Cache-Control: max-age=0
> Authorization: Basic ZGF2aWQ6bXVpcg==
1.006 < HTTP/1.1 301 Moved Permanently
1.006 < Date: Thu, 06 Nov 2008 06:29:35 GMT
< Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 Phusion_
< Location: http://
< Vary: Accept-Encoding
< Content-Length: 236
< Keep-Alive: timeout=2, max=99
< Connection: Keep-Alive
< Content-Type: text/html; charset=iso-8859-1
1.015 Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
to_
File "/usr/lib/
self.mkdir('.')
File "/home/
response = self._perform(
File "/usr/lib/
qual_
RedirectRequested: http://
1.015 return code 3
>>>>> "david" == dmuir writes:
david> Public bug reported:
Thanks a lot ! I'll to clarify a couple of points below.
david> Related to: #72792
No, it's a different kind of problem.
david> bzr 1.8
david> webdav 1.6.0
david> python 2.5
david> pycurl 7.16.4
bzr-webdav doesn't make use of pycurl if you see pycurl involved,
we have a bug :)
david> bzr init-repo http+webdav: //<urlToRepo>
david> gives me:
david> bzr: ERROR: Invalid http response for http://<urlToRepo>: Unable to handle http code 401: Authorization Required
Basically either the credentials were not provided or they were
wrong (this doesn't imply a user error but it may be the case).
david> bzr init-repo http+webdav: //<user> :<pass> @<urlToRepo>
david> gives me:
david> bzr: ERROR: http://<urlToRepo> is permanently redirected to http://<urlToRepo/
As mentioned in the NOTES file in plugin directory:
# DirectorySlash tells apache to reply with redirections if
# directories miss their final '/'. It does not play well with
# bzr (to they the least) and provide no benefits in our
# case. So just turn it off.
DirectorySlash Off
I think this is the root cause. Can you try that option on your
server ?
david> I've tried supplying the authentication details in authentication. conf,
david> but as far as I can tell, this file is being ignored.
Can you join your authentication.conf to this bug so we can debug
it may be ?
You may also want to use -Dauth to see what section is taken into
account (or not).
<snip/>
david> Here's the debug log for: //<user> :<pass> @bzr.tekika. com/edval
david> bzr init-repo http+webdav:
david> 0.016 encoding stdout as sys.stdout encoding 'UTF-8' webdav: //<user> :<pass> @bzr.tekika. com/edval' ] .bazaar/ plugins python2. 5/site- packages/ bzrlib/ plugins
david> 0.017 bzr arguments: [u'init-repo', u'-Dhttp', u'http+
david> 0.017 looking for plugins in /home/dmuir/
david> 0.021 looking for plugins in /usr/lib/
david> 0.021 Plugin name __init__ already loaded
david> 0.021 Plugin name __init__ already loaded
david> 0.070 encoding stdout as sys.stdout encoding 'UTF-8'
david> 0.095 * About to connect() to bzr.tekika.com:80
david> 0.506 > MKCOL /edval
david> 0.506 > Host: bzr.tekika.com
>> Accept: */*
>> User-Agent: bzr/1.8 (urllib)
>> Connection: Keep-Alive
>> Pragma: no-cache
>> Cache-Control: max-age=0
david> 0.757 < HTTP/1.1 401 Authorization Required Passenger/ 2.0.3 DAV/2
david> 0.758 < Date: Thu, 06 Nov 2008 06:29:35 GMT
david> < Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 Phusion_
david> < WWW-Authenticate: Basic realm="Edval Area"
david> < Vary: Accept-Encoding
david> < Content-Length: 520
david> < Keep-Alive: timeout=2, max=100
david> < Connection: Keep-Alive
david> < Content-Type: text/html; charset=iso-8859-1
david> 0.759 > MKCOL /edval
david> 0.760 > Host: bzr.tekika.com
>> Accept: */*
>> User-Agent: bzr/1.8 (urllib)
>> Connection: Keep-Alive
>> Pragma: no-cache
>> Cache-Control: max-age=0
>> Authorization: Basic
...