Back out bug 632419 (dbe8ef0649ac) on suspicion of causing Tp regressions.
authorJoe Drew <joe@drew.ca>
Thu, 24 Mar 2011 20:27:11 -0400
changeset 63849 27d5f39383694d3a381b3b1d36e3c9594113c5d7
parent 63848 7ccb164032a0754e3c7054be0d084cd18d45cc2b
child 63850 25a266b7d18e8ad34f250ba56bf46ef63ba3d6a8
push id19268
push userjdrew@mozilla.com
push dateFri, 25 Mar 2011 00:32:39 +0000
treeherdermozilla-central@b17599b51fd7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs632419
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out bug 632419 (dbe8ef0649ac) on suspicion of causing Tp regressions.
netwerk/protocol/http/nsHttpTransaction.cpp
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -790,17 +790,16 @@ nsHttpTransaction::ParseLineSegment(char
     // a line buf with only a new line char signifies the end of headers.
     if (mLineBuf.First() == '\n') {
         mLineBuf.Truncate();
         // discard this response if it is a 100 continue or other 1xx status.
         if (mResponseHead->Status() / 100 == 1) {
             LOG(("ignoring 1xx response\n"));
             mHaveStatusLine = PR_FALSE;
             mHttpResponseMatched = PR_FALSE;
-            mConnection->SetLastTransactionExpectedNoContent(PR_TRUE);
             mResponseHead->Reset();
             return NS_OK;
         }
         mHaveAllHeaders = PR_TRUE;
     }
     return NS_OK;
 }
 
@@ -879,17 +878,16 @@ nsHttpTransaction::ParseHead(char *buf,
                     return NS_ERROR_ABORT;
                 }
                 return NS_OK;
             }
         }
     }
     // otherwise we can assume that we don't have a HTTP/0.9 response.
 
-    NS_ABORT_IF_FALSE (mHttpResponseMatched, "inconsistent");
     while ((eol = static_cast<char *>(memchr(buf, '\n', count - *countRead))) != nsnull) {
         // found line in range [buf:eol]
         len = eol - buf + 1;
 
         *countRead += len;
 
         // actually, the line is in the range [buf:eol-1]
         if ((eol > buf) && (*(eol-1) == '\r'))
@@ -900,22 +898,16 @@ nsHttpTransaction::ParseHead(char *buf,
         if (NS_FAILED(rv))
             return rv;
 
         if (mHaveAllHeaders)
             return NS_OK;
 
         // skip over line
         buf = eol + 1;
-
-        if (!mHttpResponseMatched) {
-            // a 100 class response has caused us to throw away that set of
-            // response headers and look for the next response
-            return NS_ERROR_NET_INTERRUPT;
-        }
     }
 
     // do something about a partial header line
     if (!mHaveAllHeaders && (len = count - *countRead)) {
         *countRead = count;
         // ignore a trailing carriage return, and don't bother calling
         // ParseLineSegment if buf only contains a carriage return.
         if ((buf[len-1] == '\r') && (--len == 0))
@@ -1101,27 +1093,19 @@ nsHttpTransaction::ProcessData(char *buf
     LOG(("nsHttpTransaction::ProcessData [this=%x count=%u]\n", this, count));
 
     *countRead = 0;
 
     // we may not have read all of the headers yet...
     if (!mHaveAllHeaders) {
         PRUint32 bytesConsumed = 0;
 
-        do {
-            PRUint32 localBytesConsumed = 0;
-            char *localBuf = buf + bytesConsumed;
-            PRUint32 localCount = count - bytesConsumed;
-            
-            rv = ParseHead(localBuf, localCount, &localBytesConsumed);
-            if (NS_FAILED(rv) && rv != NS_ERROR_NET_INTERRUPT)
-                return rv;
-            bytesConsumed += localBytesConsumed;
-        } while (rv == NS_ERROR_NET_INTERRUPT);
-        
+        rv = ParseHead(buf, count, &bytesConsumed);
+        if (NS_FAILED(rv)) return rv;
+
         count -= bytesConsumed;
 
         // if buf has some content in it, shift bytes to top of buf.
         if (count && bytesConsumed)
             memmove(buf, buf + bytesConsumed, count);
 
         // report the completed response header
         if (mActivityDistributor && mResponseHead && mHaveAllHeaders) {