Bug 1050329 - part 2 - Add error page for h2 goaway. r=dragana,bzbarsky
authorNicholas Hurley <hurley@mozilla.com>
Thu, 25 Oct 2018 20:46:46 +0000
changeset 10661 8affdecaa250686c707c9d844e7e7cd75068a6c1
parent 10660 97808cfb5170f4b593b9fe2d48c74c13a1aaf244
child 10662 13ee3c6ac6d8a930469d363c4708225f8c90b4ba
push id95
push userfrancesco.lodolo@mozillaitalia.org
push dateThu, 01 Nov 2018 05:15:18 +0000
reviewersdragana, bzbarsky
bugs1050329
Bug 1050329 - part 2 - Add error page for h2 goaway. r=dragana,bzbarsky This is kind of like the previous patch (where we had a not-very-friendly user experience shutting down misbehaving h2 sessions), but in this case the server has proven to us that it can speak a minimum of h2, so we don't want to just fallback. Instead, when we send a GOAWAY frame because we have detected some error on the part of the server, if it's a top-level page load, we'll show an error page explaining that the server spoke bad http/2, and the site admin(s) need to be contacted. We already did this for INADEQUATE_SECURITY (which is its own special case still), but that didn't cover all the cases. Differential Revision: https://phabricator.services.mozilla.com/D8436 X-Channel-Repo: mozilla-central X-Channel-Converted-Revision: 8ee3ec2214429e42c473844b86c8c1cbd0d94d15 X-Channel-Repo: releases/mozilla-beta X-Channel-Revision: 848cf6354160ca6e2dccbeb859f64b6b9e67e4cc X-Channel-Repo: releases/mozilla-release X-Channel-Revision: 18d4c09e9378f1fca26c074a10195589248c88c0
browser/chrome/overrides/appstrings.properties
browser/chrome/overrides/netError.dtd
dom/chrome/appstrings.properties
dom/chrome/netError.dtd
mobile/overrides/appstrings.properties
mobile/overrides/netError.dtd
--- a/browser/chrome/overrides/appstrings.properties
+++ b/browser/chrome/overrides/appstrings.properties
@@ -36,8 +36,9 @@ unwantedBlocked=The site at %S has been 
 deceptiveBlocked=This web page at %S has been reported as a deceptive site and has been blocked based on your security preferences.
 cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
 corruptedContentErrorv2=The site at %S has experienced a network protocol violation that cannot be repaired.
 remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
 ## LOCALIZATION NOTE (sslv3Used) - Do not translate "%S".
 sslv3Used=Firefox cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.
 inadequateSecurityError=The website tried to negotiate an inadequate level of security.
 blockedByPolicy=Your organization has blocked access to this page or website.
+networkProtocolError=Firefox has experienced a network protocol violation that cannot be repaired.
--- a/browser/chrome/overrides/netError.dtd
+++ b/browser/chrome/overrides/netError.dtd
@@ -238,8 +238,11 @@ certificate.">
 
 <!ENTITY blockedByPolicy.title "Blocked Page">
 
 <!ENTITY clockSkewError.title "Your Computer Clock is Wrong">
 <!ENTITY clockSkewError.longDesc "Your computer thinks it is <span id='wrongSystemTime_systemDate1'/>, which prevents &brandShortName; from connecting securely. To visit <span class='hostname'></span>, update your computer clock in your system settings to the current date, time, and time zone, and then refresh <span class='hostname'></span>.">
 
 <!ENTITY prefReset.longDesc "It looks like your network security settings might be causing this. Do you want the default settings to be restored?">
 <!ENTITY prefReset.label "Restore default settings">
+
+<!ENTITY networkProtocolError.title "Network Protocol Error">
+<!ENTITY networkProtocolError.longDesc "<p>The page you are trying to view cannot be shown because an error in the network protocol was detected.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">
--- a/dom/chrome/appstrings.properties
+++ b/dom/chrome/appstrings.properties
@@ -34,8 +34,9 @@ unwantedBlocked=The site at %S has been 
 deceptiveBlocked=This web page at %S has been reported as a deceptive site and has been blocked based on your security preferences.
 cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
 corruptedContentErrorv2=The site at %S has experienced a network protocol violation that cannot be repaired.
 remoteXUL=This page uses an unsupported technology that is no longer available by default.
 sslv3Used=The safety of your data on %S could not be guaranteed because it uses SSLv3, a broken security protocol.
 weakCryptoUsed=The owner of %S has configured their website improperly. To protect your information from being stolen, the connection to this website has not been established.
 inadequateSecurityError=The website tried to negotiate an inadequate level of security.
 blockedByPolicy=Your organization has blocked access to this page or website.
+networkProtocolError=Firefox has experienced a network protocol violation that cannot be repaired.
--- a/dom/chrome/netError.dtd
+++ b/dom/chrome/netError.dtd
@@ -94,8 +94,11 @@
 <!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">
 
 <!ENTITY inadequateSecurityError.title "Your connection is not secure">
 <!-- LOCALIZATION NOTE (inadequateSecurityError.longDesc) - Do not translate
      "NS_ERROR_NET_INADEQUATE_SECURITY". -->
 <!ENTITY inadequateSecurityError.longDesc "<p><span class='hostname'></span> uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.</p><p>Error code: NS_ERROR_NET_INADEQUATE_SECURITY</p>">
 
 <!ENTITY blockedByPolicy.title "Blocked Page">
+
+<!ENTITY networkProtocolError.title "Network Protocol Error">
+<!ENTITY networkProtocolError.longDesc "<p>The page you are trying to view cannot be shown because an error in the network protocol was detected.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">
--- a/mobile/overrides/appstrings.properties
+++ b/mobile/overrides/appstrings.properties
@@ -35,8 +35,9 @@ harmfulBlocked=The site at %S has been r
 deceptiveBlocked=This web page at %S has been reported as a deceptive site and has been blocked based on your security preferences.
 unwantedBlocked=The site at %S has been reported as serving unwanted software and has been blocked based on your security preferences.
 cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
 corruptedContentErrorv2=The site at %S has experienced a network protocol violation that cannot be repaired.
 remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
 sslv3Used=Firefox cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.
 weakCryptoUsed=The owner of %S has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.
 inadequateSecurityError=The website tried to negotiate an inadequate level of security.
+networkProtocolError=Firefox has experienced a network protocol violation that cannot be repaired.
--- a/mobile/overrides/netError.dtd
+++ b/mobile/overrides/netError.dtd
@@ -215,8 +215,11 @@ netError.xhtml) because it exposes funct
 <!-- LOCALIZATION NOTE (weakCryptoUsed.longDesc) - Do not translate
      "SSL_ERROR_NO_CYPHER_OVERLAP". -->
 <!ENTITY weakCryptoUsed.longDesc "Advanced info: SSL_ERROR_NO_CYPHER_OVERLAP">
 
 <!ENTITY inadequateSecurityError.title "Your connection is not secure">
 <!-- LOCALIZATION NOTE (inadequateSecurityError.longDesc) - Do not translate
      "NS_ERROR_NET_INADEQUATE_SECURITY". -->
 <!ENTITY inadequateSecurityError.longDesc "<p><span class='hostname'></span> uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.</p><p>Error code: NS_ERROR_NET_INADEQUATE_SECURITY</p>">
+
+<!ENTITY networkProtocolError.title "Network Protocol Error">
+<!ENTITY networkProtocolError.longDesc "<p>The page you are trying to view cannot be shown because an error in the network protocol was detected.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">