mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 808313 - changing location.protocol can break nsFtpState::Init r=jduell
This commit is contained in:
parent
0c1158c097
commit
a8bd02a2f4
@ -1681,15 +1681,19 @@ nsFtpState::Init(nsFtpChannel *channel)
|
||||
mAction = PUT;
|
||||
|
||||
nsresult rv;
|
||||
nsAutoCString path;
|
||||
nsCOMPtr<nsIURL> url = do_QueryInterface(mChannel->URI());
|
||||
|
||||
nsCString host;
|
||||
url->GetAsciiHost(host);
|
||||
if (host.IsEmpty()) {
|
||||
|
||||
nsAutoCString host;
|
||||
if (url) {
|
||||
rv = url->GetAsciiHost(host);
|
||||
} else {
|
||||
rv = mChannel->URI()->GetAsciiHost(host);
|
||||
}
|
||||
if (NS_FAILED(rv) || host.IsEmpty()) {
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
|
||||
|
||||
nsAutoCString path;
|
||||
if (url) {
|
||||
rv = url->GetFilePath(path);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user