Bug 1159078 - Display a useful message in network monitor response tab when response body is truncated. r=Honza
authorMartin Koroknay <koroknay@gmail.com>
Tue, 05 Mar 2019 13:55:07 +0000
changeset 11191 fc291b201edb
parent 11190 d3ca920e54d2
child 11193 efe94e9f7f9b
push id120
push userflodolo@mozilla.com
push dateThu, 07 Mar 2019 10:16:25 +0000
reviewersHonza
bugs1159078
Bug 1159078 - Display a useful message in network monitor response tab when response body is truncated. r=Honza Previously when a JSON response's size was over the limit specified in pref devtools.netmonitor.responseBodyLimit, when inspecting this response in the Network Monitor one simply saw a JSON parse error message. This was due to the fact that the response was truncated in this view and thus no longer a valid JSON, even if the actual response was a valid JSON. Of course the actual response could have been invalid in the first place -- there was no way to know. This patch will ensure that in such cases a truncation warning message is displayed instead of a parse error message, thus avoiding a likely misleading parse error message. Differential Revision: https://phabricator.services.mozilla.com/D19302 X-Channel-Repo: mozilla-central X-Channel-Converted-Revision: 24a48c47224236b2aeaba54d39d509b34dbd188c X-Channel-Repo: releases/mozilla-beta X-Channel-Revision: 0ccb6406ff135639a179f81d4502ffac7cddcda6 X-Channel-Repo: releases/mozilla-release X-Channel-Revision: c2fca1944d8c54d01a5e2d7e13d965e4a6597307
devtools/client/netmonitor.properties
--- a/devtools/client/netmonitor.properties
+++ b/devtools/client/netmonitor.properties
@@ -126,16 +126,21 @@ jsonFilterText=Filter properties
 # LOCALIZATION NOTE (jsonScopeName): This is the text displayed
 # in the response tab of the network details pane for a JSON scope.
 jsonScopeName=JSON
 
 # LOCALIZATION NOTE (jsonpScopeName): This is the text displayed
 # in the response tab of the network details pane for a JSONP scope.
 jsonpScopeName=JSONP → callback %S()
 
+# LOCALIZATION NOTE (responseTruncated): This is the text displayed
+# in the response tab of the network details pane when the response is over
+# the truncation limit and thus was truncated.
+responseTruncated=Response has been truncated
+
 # LOCALIZATION NOTE (responsePreview): This is the text displayed
 # in the response tab of the network details pane for an HTML preview.
 responsePreview=Preview
 
 # LOCALIZATION NOTE (networkMenu.sortedAsc): This is the tooltip displayed
 # in the network table toolbar, for any column that is sorted ascending.
 networkMenu.sortedAsc=Sorted ascending