зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1251767 - Add WS filter button to net panel. Follow-up: Use multiple lines for code if necessary to not have more than 80 characters on a line and make eslint happy. r=follow-the-rule-of-eslint
This commit is contained in:
Родитель
e90bd4aabb
Коммит
fd82225d94
|
@ -1287,13 +1287,15 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
|||
// If no header found on request, check response - mainly to get
|
||||
// something we can unit test, as it is impossible to set
|
||||
// the Upgrade header on outgoing XHR as per the spec.
|
||||
if (!upgradeHeader && responseHeaders && Array.isArray(responseHeaders.headers)) {
|
||||
if (!upgradeHeader && responseHeaders &&
|
||||
Array.isArray(responseHeaders.headers)) {
|
||||
upgradeHeader = responseHeaders.headers.find(header => {
|
||||
return (header.name == "Upgrade");
|
||||
});
|
||||
}
|
||||
|
||||
// Return false if there is no such header or if its value isn't 'websocket'.
|
||||
// Return false if there is no such header or if its value isn't
|
||||
// 'websocket'.
|
||||
if (!upgradeHeader || upgradeHeader.value != "websocket") {
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче