Closed
Bug 1337737
Opened 7 years ago
Closed 7 years ago
No [Learn More] for HTTP header w/ a non-canonical case
Categories
(DevTools :: Netmonitor, defect, P2)
DevTools
Netmonitor
Tracking
(firefox54 fixed)
RESOLVED
FIXED
Firefox 54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: teoli, Assigned: mail)
References
()
Details
Attachments
(1 file, 1 obsolete file)
1.10 KB,
patch
|
Honza
:
review+
|
Details | Diff | Splinter Review |
Since bug 1320233, a [Learn More] link is added in the Network Panel. The link is added only next to the whitelisted HTTP Header. The comparison with these entries seems to be case-sensitive. A [Learn More] link is not added next to Etag (Canonical case: ETag), x-xss-protection (Canonical case: X-XSS-Protection), or x-frame-options (canonical case: X-Frame-Options). HTTP headers are not case sensistive, so we should be more lenient.
Reporter | ||
Comment 1•7 years ago
|
||
I've added a link to https://irccloud.mozilla.com/ where these 3 specifics headers are not using the canonical case.
Blocks: 1320233
Assignee | ||
Comment 2•7 years ago
|
||
I can look into this. I'll have a patch ready by the end of today.
Assignee | ||
Comment 4•7 years ago
|
||
A day late, but here's the patch. This makes the header lookup case-insensitive. On Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=aa59bf25eb620d00ea4b52d1735d50ba426b2e46&selectedJob=76070868
Attachment #8835702 -
Flags: review?(odvarko)
Comment 5•7 years ago
|
||
Comment on attachment 8835702 [details] [diff] [review] 1337737-v1.0.0.patch Review of attachment 8835702 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch! Just one inline comment Honza ::: devtools/client/netmonitor/shared/components/headers-mdn.js @@ +94,5 @@ > + const lowerCaseHeader = header.toLowerCase(); > + > + let matchingHeaders = SUPPORTED_HEADERS.filter(supportedHeader => { > + return lowerCaseHeader === supportedHeader.toLowerCase(); > + }); You don't have to iterate the entire array if you find first match so, it's better to use: Array.find() https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find Honza
Attachment #8835702 -
Flags: review?(odvarko)
Assignee | ||
Comment 6•7 years ago
|
||
Good call! Here's the updated patch. Thanks
Attachment #8835702 -
Attachment is obsolete: true
Attachment #8836382 -
Flags: review?(odvarko)
Comment 7•7 years ago
|
||
Comment on attachment 8836382 [details] [diff] [review] 1337737-v1.1.0.patch Review of attachment 8836382 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me! R+ assuming try is green Thanks for the patch! Honza
Attachment #8836382 -
Flags: review?(odvarko) → review+
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b29e907e4fbb Make lookup of MDN headers case-insensitive. r=Honza
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b29e907e4fbb
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Updated•7 years ago
|
Assignee: nobody → mail
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•