diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | loader2/ftp.c | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-09-28 Chris Lumens <clumens@redhat.com> + + * loader2/ftp.c (httpGetFileDesc): Teach the loader about more HTTP + redirect response codes. + 2006-09-28 Jeremy Katz <katzj@redhat.com> * iw/netconfig_dialog.py (NetworkConfigurator._ok): Give an error diff --git a/loader2/ftp.c b/loader2/ftp.c index 7b810692e..e75dcfb82 100644 --- a/loader2/ftp.c +++ b/loader2/ftp.c @@ -745,13 +745,14 @@ int httpGetFileDesc(char * hostname, int port, char * remotename, return FTPERR_SERVER_IO_ERROR; } else if (!strncmp(status, "200", 3)) { return sock; - } else if (!strncmp(status, "301", 3)) { + } else if (!strncmp(status, "301", 3) || !strncmp(status, "302", 3) || + !strncmp(status, "303", 3) || !strncmp(status, "307", 3)) { struct iurlinfo ui; char *redir_loc = find_header (headers, "Location"); int retval; if (redir_loc == NULL) { - logMessage(WARNING, "got a 301 response, but Location header is NULL"); + logMessage(WARNING, "got a redirect response, but Location header is NULL"); close(sock); return FTPERR_FILE_NOT_FOUND; } |