@@ -293,6 +293,11 @@ void WebLocalFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader*, Reso
293293#if PLATFORM(GTK) || PLATFORM(WPE)
294294 webPage->send (Messages::WebPageProxy::DidReceiveResponseForResource (identifier, m_frame->frameID (), response));
295295#endif
296+
297+ if (response.httpStatusCode () >= 400 ) {
298+ String message = " Failed to load resource: the server responded with a status of " + String::number (response.httpStatusCode ()) + " (" + response.httpStatusText () + ' )' ;
299+ LOG (Loading," dispatchDidReceiveResponse->message:%s" , message.utf8 ().data ());
300+ }
296301}
297302
298303void WebLocalFrameLoaderClient::dispatchDidReceiveContentLength (DocumentLoader*, ResourceLoaderIdentifier identifier, int dataLength)
@@ -342,6 +347,8 @@ void WebLocalFrameLoaderClient::dispatchDidFailLoading(DocumentLoader*, Resource
342347#endif
343348
344349 webPage->removeResourceRequest (identifier);
350+
351+ LOG (Loading," dispatchedDidFailLoading: isTimeout=%d, isCancellation=%d, isAccessControl=%d, errorCode=%d description:%s" , error.isTimeout (), error.isCancellation (), error.isAccessControl (), error.errorCode (), error.localizedDescription ().utf8 ().data ());
345352}
346353
347354bool WebLocalFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache (DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int /* length*/ )
@@ -712,6 +719,8 @@ void WebLocalFrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
712719 // If we have a load listener, notify it.
713720 if (LoadListener* loadListener = m_frame->loadListener ())
714721 loadListener->didFailLoad (m_frame.ptr (), error.isCancellation ());
722+
723+ LOG (Loading," dispatchDidFailLoad: isTimeout= %d, isCancellation= %d, isAccessControl= %d, errorCode= %d description: %s" , error.isTimeout (), error.isCancellation (), error.isAccessControl (), error.errorCode (), error.localizedDescription ().utf8 ().data ());
715724}
716725
717726void WebLocalFrameLoaderClient::dispatchDidFinishDocumentLoad ()
0 commit comments