Bug 206349 - Web Inspector: should make it more visible that an OPTIONS request is made (and failed) for XMLHttpRequest
Summary: Web Inspector: should make it more visible that an OPTIONS request is made (a...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-16 05:09 PST by Henk Poley
Modified: 2020-01-16 05:09 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henk Poley 2020-01-16 05:09:44 PST
When an OPTIONS request fails to properly respond, it would be nice if something like "[Error] Invalid response to OPTIONS request" should be logged in the JavaScript console and visualized the Web Inspector.

Currently, when you do an XMLHttpRequest, and the server fails to respond to a request that uses the OPTIONS method, this fact is kept secret to the developer looking at the Web Inspector.

You will only see the generic `[Error] XMLHttpRequest cannot load ..URL.. due to access control checks.` in the JavaScript console. Other problems around Cross-Origin Resource Sharing (CORS) with XMLHttpRequest will write a descriptive [Error] to the JavaScript console. The use of the OPTIONS method is only disclosed by doing a MITM-attack on the connection to the offending API. This is not very developer friendly. Readily available 'answers' through search engines will not mention what you need to fix, since other CORS problems also return that generic [Error].

(Tested in WebKit/Windows buildbot build 254668)