mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
fixes bug 314239 "SU downloader cannot handle redirects when not making a range request" r+sr=bzbarsky
This commit is contained in:
parent
c0b11f277b
commit
7285cba05b
@ -742,15 +742,18 @@ nsIncrementalDownload::OnChannelRedirect(nsIChannel *oldChannel,
|
||||
|
||||
NS_NAMED_LITERAL_CSTRING(rangeHdr, "Range");
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// If we didn't have a Range header, then we must be doing a full download.
|
||||
nsCAutoString rangeVal;
|
||||
http->GetRequestHeader(rangeHdr, rangeVal);
|
||||
NS_ENSURE_STATE(!rangeVal.IsEmpty());
|
||||
if (!rangeVal.IsEmpty()) {
|
||||
http = do_QueryInterface(newChannel);
|
||||
NS_ENSURE_STATE(http);
|
||||
|
||||
http = do_QueryInterface(newChannel);
|
||||
NS_ENSURE_STATE(http);
|
||||
|
||||
nsresult rv = http->SetRequestHeader(rangeHdr, rangeVal, PR_FALSE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = http->SetRequestHeader(rangeHdr, rangeVal, PR_FALSE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// Give the observer a chance to see this redirect notification.
|
||||
nsCOMPtr<nsIChannelEventSink> sink = do_GetInterface(mObserver);
|
||||
|
Loading…
Reference in New Issue
Block a user