Bug 1234833 - Fix handling of some PostData parameters. r=vporof
authorTim Nguyen <ntim.bugs@gmail.com>
Sat, 26 Dec 2015 13:52:59 -0500
changeset 277661 10ddceabece05224d104081ba4edf7a4a994c9c4
parent 277652 4a559a618d6798eb9a8fdc559f5a7a00085e2062
child 277662 f697cb63c888cd96e5ddfaf8901cb8187e7c840e
push id29828
push usercbook@mozilla.com
push dateMon, 28 Dec 2015 09:23:07 +0000
treeherdermozilla-central@a3271c17e5ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs1234833
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1234833 - Fix handling of some PostData parameters. r=vporof
devtools/client/netmonitor/netmonitor-view.js
--- a/devtools/client/netmonitor/netmonitor-view.js
+++ b/devtools/client/netmonitor/netmonitor-view.js
@@ -2478,17 +2478,16 @@ NetworkDetailsView.prototype = {
       }));
     this._cookies = new VariablesView($("#all-cookies"),
       Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
         emptyText: L10N.getStr("cookiesEmptyText"),
         searchPlaceholder: L10N.getStr("cookiesFilterText")
       }));
     this._params = new VariablesView($("#request-params"),
       Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
-        onlyEnumVisible: true,
         emptyText: L10N.getStr("paramsEmptyText"),
         searchPlaceholder: L10N.getStr("paramsFilterText")
       }));
     this._json = new VariablesView($("#response-content-json"),
       Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
         onlyEnumVisible: true,
         searchPlaceholder: L10N.getStr("jsonFilterText")
       }));
@@ -2861,31 +2860,34 @@ NetworkDetailsView.prototype = {
   _setRequestPostParams: Task.async(function*(aHeaders, aUploadHeaders, aPostData) {
     if (!aHeaders || !aUploadHeaders || !aPostData) {
       return;
     }
 
     let formDataSections = yield RequestsMenuView.prototype._getFormDataSections(
       aHeaders, aUploadHeaders, aPostData);
 
+    this._params.onlyEnumVisible = false;
+
     // Handle urlencoded form data sections (e.g. "?foo=bar&baz=42").
     if (formDataSections.length > 0) {
       formDataSections.forEach(section => {
         this._addParams(this._paramsFormData, section);
       });
     }
     // Handle JSON and actual forms ("multipart/form-data" content type).
     else {
       let postDataLongString = aPostData.postData.text;
       let postData = yield gNetwork.getString(postDataLongString);
       let jsonVal = null;
       try {
         jsonVal = JSON.parse(postData);
       } catch (ex) { }
       if (jsonVal) {
+        this._params.onlyEnumVisible = true;
         let jsonScopeName = L10N.getStr("jsonScopeName");
         let jsonVar = { label: jsonScopeName, rawObject: jsonVal };
         let jsonScope = this._params.addScope(jsonScopeName);
         jsonScope.expanded = true;
         let jsonItem = jsonScope.addItem("", { enumerable: true });
         jsonItem.populate(jsonVal, { sorted: true });
       } else {
         // This is really awkward, but hey, it works. Let's show an empty