Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 132731 onBeforeSendHeaders listener with blocking option not fired for XMLHttpRequests
Starred by 4 users Reported by, Jun 14 2012 Back to list
Status: WontFix
Owner: ----
Closed: Jun 2012
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment
Chrome Version       : 19.0.1084.56
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

What steps will reproduce the problem?
1. Add two listeners to onBeforeSendHeaders, one with the blocking option and one without.
2. Issue an XMLHttpRequest.
3. Notice only the non blocking listener is fired.

What is the expected result?
The listener with blocking option should have fired to allow the headers to be modified for XMLHttpRequests.

What happens instead?
The onBeforeSendHeaders listener with blocking option did not fire.

UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
34.3 KB Download
Labels: -Area-Undefined Area-Internals Internals-Network Feature-Extensions
Comment 3 by, Jun 18 2012
Status: WontFix
This is working as intended. If you submit a blocking XMLHttpRequest, the JavaScript VM is blocked on that request. It cannot be called to process the blocking onBeforeRequest handler.

I am marking the bug as WontFix but will follow the bug, in case there is any reason for which my argument would be invalid.
Comment 4 by, Jul 22 2012
I'm an author of Advanced Rest Client application for Chrome and I have problem with this issue. 
To send the request I use XMLHttpRequest class. According to spec you can't set some of headers like Cookie, User-Agent etc. 
Only way to make it work is to set prohibited headers via webRequest API. Now I read that this is impossible :/
Maybe, when XMLHttpRequest is not blocking this event should be called? 
Comment 5 by, Jul 23 2012
The declarative WebRequest API will help you but it is still under development.
Project Member Comment 6 by, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 7 by, Mar 10 2013
Labels: -Area-Internals -Internals-Network -Feature-Extensions Cr-Platform-Extensions Cr-Internals Cr-Internals-Network
Sign in to add a comment