Index: Source/WebCore/loader/SubresourceLoader.cpp |
=================================================================== |
--- Source/WebCore/loader/SubresourceLoader.cpp (revision 140736) |
+++ Source/WebCore/loader/SubresourceLoader.cpp (working copy) |
@@ -213,6 +213,8 @@ |
void SubresourceLoader::didReceiveData(const char* data, int length, long long encodedDataLength, bool allAtOnce) |
{ |
+ if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) |
+ return; |
ASSERT(!m_resource->resourceToRevalidate()); |
ASSERT(!m_resource->errorOccurred()); |
ASSERT(m_state == Initialized); |
@@ -231,8 +233,8 @@ |
if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnoreHTTPStatusCodeErrors()) |
return false; |
+ m_state = Finishing; |
m_resource->error(CachedResource::LoadError); |
- m_state = Finishing; |
cancel(); |
return true; |
} |