Last Comment Bug 629458 - nsHttpConnection::PushBack uses NS_NOTREACHED for code that is reached
: nsHttpConnection::PushBack uses NS_NOTREACHED for code that is reached
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Networking: HTTP (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Patrick McManus [:mcmanus]
:
:
Mentors:
http://michal.lightcomp.cz/bug363109/...
: 254181 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-27 11:30 PST by Patrick McManus [:mcmanus]
Modified: 2011-06-01 06:50 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
pushback-notreached patch v1 (2.28 KB, patch)
2011-01-27 11:32 PST, Patrick McManus [:mcmanus]
no flags Details | Diff | Splinter Review

Description Patrick McManus [:mcmanus] 2011-01-27 11:30:02 PST
currently in nsHttpConnection.cpp:

    nsresult PushBack(const char *data, PRUint32 length) { NS_NOTREACHED("PushBack"); return NS_ERROR_UNEXPECTED; }

Pushback is going to be called when an nsHTTPTransaction reads more data off the inputstream than was specified by the framing of the http response. The normal place this happens is in pipelining, where the "extra" bytes are really the first bytes of the next response in the pipeline. There is nothing wrong with that case - the pipeline::PushBack implementation moves them over to the right transaction.

But this can happen on a non-pipeline transaction when the server responds with more data than its framing indicates it will. We've seen that with 304/204 responses (which should be empty) as well as with HEAD in the past. I've also seen some servers add extra empty lines at the end of chunked encodings. It's all a server side bug, but its something we deal with fine with the existing behavior of nsHttpConnection::PushBack (i.e. do nothing) modulo the NOTREACHED complaints.

Just need to change the NS_NOTREACHED and NS_ERROR_UNEXPECTED to be a LOG and NS_OK, respectively.
Comment 1 Patrick McManus [:mcmanus] 2011-01-27 11:32:00 PST
Created attachment 507557 [details] [diff] [review]
pushback-notreached patch v1
Comment 2 Patrick McManus [:mcmanus] 2011-01-28 11:58:46 PST
*** Bug 254181 has been marked as a duplicate of this bug. ***
Comment 3 Patrick McManus [:mcmanus] 2011-06-01 06:39:41 PDT
http upgrade happened to fix this

Note You need to log in before you can comment on or make changes to this bug.