FS#23800 - Temporary Redirect is not handled correctly
Attached to Project:
Pacman
Opened by Xyne (Xyne) - Sunday, 17 April 2011, 01:32 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 19 April 2011, 13:30 GMT
Opened by Xyne (Xyne) - Sunday, 17 April 2011, 01:32 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 19 April 2011, 13:30 GMT
|
Details
When a server returns status code 307 (Temporary Redirect),
the request should be resubmitted to the server in the
"Location" header using the same method as the current
request. Pacman currently treats 307 as an error and moves
on to the next server in the list.
Example: :: Retrieving packages from community... error: failed retrieving file 'cuneiform-1.0.0-1-x86_64.pkg.tar.xz' from localhost : Temporary Redirect |
This task depends upon
Closed by Dan McGee (toofishes)
Tuesday, 19 April 2011, 13:30 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issue, can work around using 301/302, switching to libcurl in 3.6.X, will patch libfetch package in Arch if necessary
Tuesday, 19 April 2011, 13:30 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issue, can work around using 301/302, switching to libcurl in 3.6.X, will patch libfetch package in Arch if necessary
#define HTTP_MOVED_PERM 301
#define HTTP_MOVED_TEMP 302
#define HTTP_SEE_OTHER 303
#define HTTP_NOT_MODIFIED 304
#define HTTP_TEMP_REDIRECT 307
...
#define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \
|| (xyz) == HTTP_MOVED_TEMP \
|| (xyz) == HTTP_TEMP_REDIRECT \
|| (xyz) == HTTP_SEE_OTHER)
Name : pacman
Version : 3.5.1-1
Here's a dump of the headers sent back by the server:
HTTP/1.1 307 Temporary Redirect
Server: Pacserve/1.0
Date: Tue, 19 Apr 2011 09:05:44 GMT
Location: http://mir.archlinux.fr/core/os/x86_64/core.db
Content-Length: 0
This works as expected with the XferCommands for both curl and wget. You can test it with Pacserve directly if you like:
http://xyne.archlinux.ca/projects/pacserve/
Just set pacserve as your main mirror, start the server (pacserve), then run "pacman -Sy". The database HEAD requests will generate the 307 responses.