This is a patch making the search for the Location header on a 30X HTTP
response case insensitive, rather then case sensitive. I couldn't find
where the RFCs mandate the header should be capitalized, and sometimes
it isn't.
curl -v http://download.fedoraproject.org/pub/fedora/linux/ shows that
the response header has a lowercase "location" header which results in
anaconda giving a "got a redirect response but Location header is NULL"
http://kanarip.fedorapeople.org/NULL-Location-header.png
Verification with wget[1] confirms the lowercase header.
Cherry-picking commit 017eafa7aac8897ef2cd04cb3e1f85808651b7a0 from
remote git://git.kanarip.com/anaconda should apply cleanly to f9-branch,
f10-branch and master.
-Jeroen
[1] https://fedorahosted.org/mirrormanager/ticket/10
>From 8dfd0bb43a76f8624fab360a47ae2d47796552ad Mon Sep 17 00:00:00 2001
From: Jeroen van Meeuwen (Fedora Unity) <kanarip@xxxxxxxxxxxxxxx>
Date: Tue, 30 Dec 2008 02:44:41 +0100
Subject: [PATCH] Fix case sensitivity when searching for headers
---
loader/ftp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/loader/ftp.c b/loader/ftp.c
index e84237c..aa7a95b 100644
--- a/loader/ftp.c
+++ b/loader/ftp.c
@@ -645,7 +645,7 @@ static char *find_header (char *headers, char *to_find)
if (asprintf(&searching_for, "\r\n%s:", to_find) == -1)
return NULL;
- if ((start = strstr(headers, searching_for)) == NULL) {
+ if ((start = strcasestr(headers, searching_for)) == NULL) {
free(searching_for);
return NULL;
}
--
1.6.0.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list