Bug 1325876 - Show internal error page for HTTP responses with error codes (4xx, 5xx) and Content-Length: 0 instead of blank page r=manuel,necko-reviewers,fluent-reviewers,jesup,bolsson,valentin,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D220193
This commit is contained in:
@@ -3353,6 +3353,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
nestedURI = do_QueryInterface(tempURI);
|
||||
}
|
||||
error = "unknownProtocolFound";
|
||||
} else if (NS_ERROR_NET_EMPTY_RESPONSE == aError) {
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
error = "httpErrorPage";
|
||||
} else if (NS_ERROR_NET_ERROR_RESPONSE == aError) {
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
error = "serverError";
|
||||
@@ -6102,6 +6105,7 @@ nsresult nsDocShell::FilterStatusForErrorPage(
|
||||
|
||||
if (aStatus == NS_ERROR_NET_TIMEOUT ||
|
||||
aStatus == NS_ERROR_NET_TIMEOUT_EXTERNAL ||
|
||||
aStatus == NS_ERROR_NET_EMPTY_RESPONSE ||
|
||||
aStatus == NS_ERROR_NET_ERROR_RESPONSE ||
|
||||
aStatus == NS_ERROR_PROXY_GATEWAY_TIMEOUT ||
|
||||
aStatus == NS_ERROR_REDIRECT_LOOP ||
|
||||
|
||||
Reference in New Issue
Block a user