Current code avoids calling gotHeaders and gotChunk for messages that are not "successful". This makes them skip things such as content sniffing, and would hog the memory for responses with big bodies, were accumulate not disabled =). This last fact is the reason why error pages with content, such as plone.org's 404 pages are not displayed.
Created attachment 28630 [details] proposed fix
Okay, any idea about the impact on the http tests?
(In reply to comment #2) > Okay, any idea about the impact on the http tests? > I was getting some tests fixed, and one regression. I have reworked the patch to fix the xmlhttprequest regression, and we are now down to 2 failing tests, and no crash, in my tests. I'm going to upload the patch now.
Created attachment 28695 [details] proposed fix This patch differs from the other in that it also does not give special treatment to 304 regarding gotHeaders and gotChunk, but does avoid trying a content sniff on it. On my local setup, I get the following impact on the http tests: Without the patch: Fails: http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html http/tests/xmlhttprequest/xmlhttprequest-missing-file-exception.html http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress.html http/tests/xmlhttprequest/web-apps/013.html Crashes: http/tests/xmlhttprequest/web-apps/002-simple.html With the patch: Fails: http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html http/tests/xmlhttprequest/xmlhttprequest-missing-file-exception.html
Comment on attachment 28630 [details] proposed fix Forgot to obsolete when uploading the new one.
Comment on attachment 28695 [details] proposed fix > + if ((msg->status_code != SOUP_STATUS_NOT_MODIFIED) > + &&!soup_message_headers_get_content_type(msg->response_headers, NULL)) style. put a space in there...
Landed as r41974 with the style fix.