Bug 1378308 - nsHttpChannel::GetAlternativeDataType returns alt-data type when delivering data from network, r=valentin

When racing cache with network and the network wins, we don't reset mAvailableCachedAltDataType. So when the cache entry has been opened and has alt-data then nsHttpChannel::GetAlternativeDataType returns alt-data type, but we're delivering raw response (no conversion are applied) from the network.
This commit is contained in:
Michal Novotny 2017-07-06 13:38:10 +02:00
Родитель 1b3f0224fd
Коммит 39de30297b
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -7007,6 +7007,7 @@ nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
MOZ_ASSERT(request == mTransactionPump);
LOG((" First response from network\n"));
mFirstResponseSource = RESPONSE_FROM_NETWORK;
mAvailableCachedAltDataType.Truncate();
} else if (WRONG_RACING_RESPONSE_SOURCE(request)) {
LOG((" Early return when racing. This response not needed."));
return NS_OK;