[XHR] Log SetRequestHeader() forbidden header failures to the web console.

RESOLVED FIXED in Firefox 51

Status

()

Core
DOM: Core & HTML
P3
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: Thomas Wisniewski, Assigned: Thomas Wisniewski)

Tracking

unspecified
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Calling XMLHttpRequest.SetRequestHeader() for a forbidden header silently fails (as per spec step 5), only logging an NS_WARNING. It might be worthwhile to also log the result to the console as well/instead, so developers get better feedback.

Updated

2 years ago
Priority: -- → P3
(Assignee)

Comment 1

2 years ago
Created attachment 8781574 [details] [diff] [review]
1295128-log_setRequestHeader_with_forbidden_header.diff

Here's a simple patch which just logs a message to the web console instead of doing the NS_WARNING.
Assignee: nobody → wisniewskit
Status: NEW → ASSIGNED
Attachment #8781574 - Flags: review?(mrbkap)

Updated

2 years ago
Attachment #8781574 - Flags: review?(mrbkap) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 2

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7497dca8bbb5
Log attempts to use SetRequestHeader to set a forbidden header to the web console. r=mrbkap
Keywords: checkin-needed

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7497dca8bbb5
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Depends on: 1366595
You need to log in before you can comment on or make changes to this bug.