Description of problem: log-delete doesn't handle 301 redirects properly. Version-Release number of selected component (if applicable): 0.9.2 How reproducible: always Steps to Reproduce: 1. Attempt to delete logs from a location which returns a 301 redirect (e.g. a directory without trailing slash) Actual results: 2012-09-03 16:08:14,272 bkr.server.tools.log_delete ERROR HTTP Error 401: Authorization Required Expected results: Should follow the redirect and issue the DELETE for the new location.
However this does work with 302 redirects (i.e http->https).
Are you sure it's not an actual 401 that is causing the problem? I was doing some deletes and the logs look like this. 10.64.25.186 - - [03/Sep/2012:22:08:15 +1000] "DELETE /beaker/logs/results/2898 HTTP/1.1" 301 418 "-" "Python-urllib/2.6" 10.64.25.186 - - [03/Sep/2012:22:08:15 +1000] "DELETE /beaker/logs/results/2898/ HTTP/1.1" 204 - "-" "Python-urllib/2.6" 10.64.25.186 - - [03/Sep/2012:22:08:15 +1000] "DELETE /beaker/logs/results/2899 HTTP/1.1" 301 418 "-" "Python-urllib/2.6" 10.64.25.186 - - [03/Sep/2012:22:08:15 +1000] "DELETE /beaker/logs/results/2899/ HTTP/1.1" 204 - "-" "Python-urllib/2.6"
No, that doesn't work for me. log-delete authenticates properly for the first request (the one that gives a 301) but it doesn't authenticate properly on the second (redirected) request: 10.64.25.67 - - [04/Sep/2012:14:32:24 +1000] "DELETE /archive/2012/09/0/94/94 HTTP/1.1" 401 525 "-" "Python-urllib/2.6" 10.64.25.67 - HTTP/hostname@REALM [04/Sep/2012:14:32:24 +1000] "DELETE /archive/2012/09/0/94/94 HTTP/1.1" 301 421 "-" "Python-urllib/2.6" 10.64.25.67 - - [04/Sep/2012:14:32:25 +1000] "DELETE /archive/2012/09/0/94/94/ HTTP/1.1" 401 525 "-" "Python-urllib/2.6"
On Gerrit: http://gerrit.beaker-project.org/1316
Beaker 0.9.4 has been released.