bug 763352 - Proxy/NPN issue r=honzab

--HG--
extra : rebase_source : b4b592d695fe0ddbf5d451b385dc45202d100816
This commit is contained in:
Patrick McManus 2012-06-20 20:55:02 -04:00
Родитель c448e09b9b
Коммит 7cd2fe0d0c
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -1365,6 +1365,20 @@ nsHttpConnection::OnSocketReadable()
bool again = true; bool again = true;
do { do {
if (!mProxyConnectInProgress && !mNPNComplete) {
// Unless we are setting up a tunnel via CONNECT, prevent reading
// from the socket until the results of NPN
// negotiation are known (which is determined from the write path).
// If the server speaks SPDY it is likely the readable data here is
// a spdy settings frame and without NPN it would be misinterpreted
// as HTTP/*
LOG(("nsHttpConnection::OnSocketReadable %p return due to inactive "
"tunnel setup but incomplete NPN state\n", this));
rv = NS_OK;
break;
}
rv = mTransaction->WriteSegments(this, nsIOService::gDefaultSegmentSize, &n); rv = mTransaction->WriteSegments(this, nsIOService::gDefaultSegmentSize, &n);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
// if the transaction didn't want to take any more data, then // if the transaction didn't want to take any more data, then