Last modified: 2013-11-26 21:02:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46921, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44921 - Support for OPTIONS verb (preflight) in API requests when doing CORS
Support for OPTIONS verb (preflight) in API requests when doing CORS
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 01:39 UTC by Juliusz Gonera
Modified: 2013-11-26 21:02 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Juliusz Gonera 2013-02-13 01:39:29 UTC
Preflight needs to be supported to use progress events[1]. The spec says they need a preflight to work[2].

[1] https://dvcs.w3.org/hg/progress/raw-file/tip/Overview.html
[2] http://www.w3.org/TR/cors/#cors-api-specification-response
Comment 1 Brad Jorsch 2013-02-26 20:54:53 UTC
I see two potential issues here (and one client issue).

0. The API requires the "origin" URL parameter be included with the OPTIONS request. In other words, it must be in the URL rather than in the POST body. This is a client issue.

1. The API will execute the query for an OPTIONS request for an allowed query, when it should wait for the followup GET or POST. This should be taken care of by Gerrit change #51007.

2. WMF's squids appear to reject the OPTIONS query before it ever gets to the API. That's a matter for a different bug, probably bug 41731.
Comment 2 Yuri Astrakhan 2013-02-26 21:32:37 UTC
merged Gerrit change #51007.
Comment 3 Brad Jorsch 2013-02-26 21:43:33 UTC
I'm going to mark this as fixed; the squid issue is already tracked in bug 41731.
Comment 4 Gerrit Notification Bot 2013-11-26 20:59:40 UTC
Change 97836 had a related patch set uploaded by JGonera:
Uncomment and fix upload progress event test for Api

https://gerrit.wikimedia.org/r/97836
Comment 5 Brad Jorsch 2013-11-26 21:02:47 UTC
(reset bug to "fixed", that patch is dependent on this bug but not really about it)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links