Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

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
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


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.

:: 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
Comment by Dan McGee (toofishes) - Monday, 18 April 2011, 21:00 GMT
Hmm, this shouldn't be happening. From the libfetch source, and we let libfetch follow redirects. I hope we are talking about 3.5.X here and you actually set the version correctly...

#define HTTP_MOVED_PERM 301
#define HTTP_MOVED_TEMP 302
#define HTTP_SEE_OTHER 303
#define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \
|| (xyz) == HTTP_MOVED_TEMP \
|| (xyz) == HTTP_TEMP_REDIRECT \
|| (xyz) == HTTP_SEE_OTHER)
Comment by Xyne (Xyne) - Tuesday, 19 April 2011, 09:11 GMT
> pacman -Qi pacman
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
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:

Just set pacserve as your main mirror, start the server (pacserve), then run "pacman -Sy". The database HEAD requests will generate the 307 responses.
Comment by Dan McGee (toofishes) - Tuesday, 19 April 2011, 13:29 GMT
Sent this upstream; will link to bug report I filed once it becomes public in their system.
Comment by Dan McGee (toofishes) - Tuesday, 19 April 2011, 13:36 GMT Comment by Martti K├╝hne (mar77i) - Thursday, 18 August 2011, 10:44 GMT
worked around this issue in pacserve for pacman 3.5.3 (inofficial installation cd) by setting pacserve's response code to 302.