fixes bug 138780 - Redirect with non-ASCII in URL fails

r=andreas.otte@debitel.net sr=rpotts
This commit is contained in:
darin%netscape.com 2002-04-26 22:50:50 +00:00
parent ec30a74a29
commit 8c49d39ba8

View File

@ -1415,6 +1415,11 @@ nsHttpChannel::ProcessRedirection(PRUint32 redirectType)
if (!location)
return NS_ERROR_FAILURE;
// make sure non-ASCII characters in the location header are escaped.
nsCAutoString locationBuf;
if (NS_EscapeURL(location, -1, esc_OnlyNonASCII, locationBuf))
location = locationBuf.get();
if (mRedirectionLimit == 0) {
LOG(("redirection limit reached!\n"));
// this error code is fatal, and should be conveyed to our listener.