summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 17:52:39 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 17:52:39 +0100
commit6ee4e4436c1fc36f743c1ba9d5ef22ab988adb3d (patch)
tree011ac3a273b630b3ed7c83692308a3c9ef941ae1 /devtools/client/netmonitor
parent13a6805652925398b2f079f7ee7fba4b512b51ad (diff)
downloadUXP-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
Diffstat (limited to 'devtools/client/netmonitor')
-rw-r--r--devtools/client/netmonitor/requests-menu-view.js15
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;