mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
fixes bug 138780 - Redirect with non-ASCII in URL fails
r=andreas.otte@debitel.net sr=rpotts
This commit is contained in:
parent
ec30a74a29
commit
8c49d39ba8
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user