diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 17:52:39 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 17:52:39 +0100 |
commit | 6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d (patch) | |
tree | 011ac3a273b630b3ed7c83692308a3c9ef941ae1 | |
parent | 13a6805652925398b2f079f7ee7fba4b512b51ad (diff) | |
download | UXP-6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d.tar UXP-6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d.tar.gz UXP-6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d.tar.lz UXP-6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d.tar.xz UXP-6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d.zip |
Show the Status Line (e.g. "HTTP/2.0 200 OK") in raw headers (response)
https://github.com/MoonchildProductions/moebius/pull/323
-rw-r--r-- | devtools/client/netmonitor/requests-menu-view.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/devtools/client/netmonitor/requests-menu-view.js b/devtools/client/netmonitor/requests-menu-view.js index ea8ec52b1..4ee307145 100644 --- a/devtools/client/netmonitor/requests-menu-view.js +++ b/devtools/client/netmonitor/requests-menu-view.js @@ -399,9 +399,20 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, { if (rawHeadersHidden) { let selected = this.selectedItem.attachment; let selectedRequestHeaders = selected.requestHeaders.headers; - let selectedResponseHeaders = selected.responseHeaders.headers; + // display Status-Line above other response headers + let selectedStatusLine = selected.httpVersion + + " " + selected.status + + " " + selected.statusText + + "\n"; requestTextarea.value = writeHeaderText(selectedRequestHeaders); - responseTextare.value = writeHeaderText(selectedResponseHeaders); + // sometimes it's empty + if (selected.responseHeaders) { + let selectedResponseHeaders = selected.responseHeaders.headers; + responseTextare.value = selectedStatusLine + + writeHeaderText(selectedResponseHeaders); + } else { + responseTextare.value = selectedStatusLine; + } $("#raw-headers").hidden = false; } else { requestTextarea.value = null; |