зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1409858 - H2 CONNECT Tunnel Marked Plaintext Too Late r=nwgh
MozReview-Commit-ID: IjuYDuvufRd --HG-- extra : rebase_source : ab7773dc015c31d6ba1eb8c933efc79c38b29d06
This commit is contained in:
Родитель
eaeac4ff97
Коммит
f99705311c
|
@ -595,9 +595,18 @@ void
|
|||
Http2Session::DontReuse()
|
||||
{
|
||||
LOG3(("Http2Session::DontReuse %p\n", this));
|
||||
if (!OnSocketThread()) {
|
||||
LOG3(("Http2Session %p not on socket thread\n", this));
|
||||
nsCOMPtr<nsIRunnable> event = NewRunnableMethod(
|
||||
"Http2Session::DontReuse", this, &Http2Session::DontReuse);
|
||||
gSocketTransportService->Dispatch(event, NS_DISPATCH_NORMAL);
|
||||
return;
|
||||
}
|
||||
|
||||
mShouldGoAway = true;
|
||||
if (!mStreamTransactionHash.Count())
|
||||
if (!mClosed && !mStreamTransactionHash.Count()) {
|
||||
Close(NS_OK);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
|
|
@ -1052,6 +1052,8 @@ Http2Stream::ConvertResponseHeaders(Http2Decompressor *decompressor,
|
|||
if ((httpResponseCode / 100) != 2) {
|
||||
MapStreamToPlainText();
|
||||
}
|
||||
MapStreamToHttpConnection();
|
||||
ClearTransactionsBlockedOnTunnel();
|
||||
}
|
||||
|
||||
if (httpResponseCode == 101) {
|
||||
|
@ -1161,10 +1163,6 @@ Http2Stream::SetAllHeadersReceived()
|
|||
}
|
||||
|
||||
mAllHeadersReceived = 1;
|
||||
if (mIsTunnel) {
|
||||
MapStreamToHttpConnection();
|
||||
ClearTransactionsBlockedOnTunnel();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -392,14 +392,15 @@ TLSFilterTransaction::NudgeTunnel(NudgeTunnelCallback *aCallback)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
uint32_t notUsed;
|
||||
int32_t written = PR_Write(mFD, "", 0);
|
||||
if ((written < 0) && (PR_GetError() != PR_WOULD_BLOCK_ERROR)) {
|
||||
nsCOMPtr<nsISSLSocketControl> ssl(do_QueryInterface(mSecInfo));
|
||||
nsresult rv = ssl ? ssl->DriveHandshake() : NS_ERROR_FAILURE;
|
||||
if (NS_FAILED(rv) && rv != NS_BASE_STREAM_WOULD_BLOCK) {
|
||||
// fatal handshake failure
|
||||
LOG(("TLSFilterTransaction %p Fatal Handshake Failure: %d\n", this, PR_GetError()));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
uint32_t notUsed;
|
||||
Unused << OnReadSegment("", 0, ¬Used);
|
||||
|
||||
// The SSL Layer does some unusual things with PR_Poll that makes it a bad
|
||||
|
|
Загрузка…
Ссылка в новой задаче