Bug 1368080 - Use REFUSED_STREAM instead of INTERNAL_ERROR on duplicate push key. r=mcmanus

MozReview-Commit-ID: BEUo6YpcyZj

--HG--
extra : rebase_source : 7733620d2149bac35201c74ab451ebb292268442
This commit is contained in:
Nicholas Hurley 2017-06-28 10:28:54 -07:00
parent f6e9a6a347
commit 2c463b64a5

View File

@ -1832,8 +1832,9 @@ Http2Session::RecvPushPromise(Http2Session *self)
} else {
LOG3(("Http2Session::RecvPushPromise %p place stream into session cache\n", self));
if (!cache->RegisterPushedStreamHttp2(key, pushedStream)) {
// This only happens if they've already pushed us this item.
LOG3(("Http2Session::RecvPushPromise registerPushedStream Failed\n"));
self->CleanupStream(pushedStream, NS_ERROR_FAILURE, INTERNAL_ERROR);
self->CleanupStream(pushedStream, NS_ERROR_FAILURE, REFUSED_STREAM_ERROR);
self->ResetDownstreamState();
return NS_OK;
}