Bug 204488 - anaconda's stage 1 doesn't follow http redirects
anaconda's stage 1 doesn't follow http redirects
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2006-08-29 10:52 EDT by Joshua Jensen
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-14 14:41:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joshua Jensen 2006-08-29 10:52:03 EDT
Description of problem:
If you have your kickstart file on the web, and point to it using a URL that
needs a redirect (via a 301 with a Location: line), it doesn't find it.  Since I
don't really know the correct terminology for what I'm saying here, an example
is in order:
should redirect to:

The linux installer isn't following that redirect.  It works fine if I point it
straight at the "final" destination.

How reproducible:

Steps to Reproduce:
1.create a webpage with a redirect
2.put a kickstart file there
3.point anaconda at the webpage

Actual Results:  It tried a non-kickstart install.

Expected Results:  Should have followed the redirect.  Or at least warned that
it couldn't find it.  Doing something completely different is unacceptable.
Comment 1 Joshua Jensen 2006-08-29 10:56:04 EDT
This is not a duplicate of BZ #91488.  That bug is 3 years old, for RH9.  The
same problem occurs, but the product name is now RHEL4.  Please fix!  Many
content systems use redirects for optimizing server location and download speed.
 Anaconda is very basically broken on such networks.
Comment 3 Doug Scoular 2006-09-13 06:29:55 EDT
Just to add to Joshua's report. This issue is 100% repeatable. The anaconda
"loader2" C code doesn't expect any HTTP response other than 200 (Success OK) or
404 (File not found) meaning that all other valid responses are not handled
correctly. There are, in fact, five broad categorisations of HTTP responses: 1XX
are informational, 2XX are success related, 3XX are redirection related, 4XX are
client error related and 5XX are server error related. Our interest here is the
fact that valid 3XX responses are completely ignored by Anaconda's "loader2" C code.

For a complete list of HTTP response codes please consult:


The problem code can be found in the anaconda- SRPM in the file:


Starting at line 547 we see:

            if (!strcmp(start, "404")) {
                return FTPERR_FILE_NOT_FOUND;
            } else if (strcmp(start, "200")) {
                return FTPERR_BAD_SERVER_RESPONSE;

This code can be trivially expanded to deal with 3XX redirection related responses.

Since transparent redirection is very common in global enterprises and ISPs
please consider implementing a fix for this issue.

Many thanks,

Doug Scoular

Comment 4 Doug Scoular 2006-09-13 06:47:52 EDT

I just checked the anaconda- source and can confirm that it still has
this issue. Looking at line 694 of anaconda- we see the
problem code has been enhanced slightly to deal with 403 (Forbidden) but still
nothing to handle 3XX (Redirection):

            if (!strcmp(start, "404")) {
                return FTPERR_FILE_NOT_FOUND;
            } else if (!strcmp(start, "403")) {
                return FTPERR_PERMISSION_DENIED;
            } else if (strcmp(start, "200")) {
                logMessage(ERROR, "bad HTTP response: %s", start);
                return FTPERR_BAD_SERVER_RESPONSE;


Doug Scoular
Comment 5 Chris Lumens 2006-09-14 14:41:13 EDT
This will be fixed in the next build of anaconda (and therefore FC6 and RHEL5).
 If you require this functionality in an update release of RHEL4, please talk to
your support representative who will raise the issue through the appropriate
support channels.

Note You need to log in before you can comment on or make changes to this bug.