Closed
Bug 727412
Opened 13 years ago
Closed 12 years ago
Unnecessary CORS preflight when using upload progress
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: lukspa, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Build ID: 20120210021051
Steps to reproduce:
1. Create async POST xhr request with content-type: multipart/form-data
2. set onprogress handler or onloadstart handler on xhr.upload
3. send request
Example code:
xhr.open("POST", this.uploadScript, true);
xhr.setRequestHeader('Content-type', 'multipart/form-data; boundary=' + boundary);
xhr.onload = this._fileUploadComplete;
xhr.onerror = this._fileUploadError;
xhr.onabort = this._fileUploadAbort;
xhr.upload.onprogress = this._fileUploadProgress; // problem cause
xhr.upload.onloadstart = this._fileUploadLoadStart; // problem cause
xhr.sendAsBinary(this.currItem.postData);
Actual results:
FF sends a OPTIONS preflight with:
Access-Control-Allow-Methods: POST
Expected results:
FF should't send a preflight. Request should be treated as simple CORS request.
![]() |
||
Updated•12 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
![]() |
||
Comment 1•12 years ago
|
||
From http://www.w3.org/TR/XMLHttpRequest2/#cross-origin-request-steps :
force preflight flag
True if the upload events flag is set, or false otherwise.
And from http://www.w3.org/TR/XMLHttpRequest2/#upload-events-flag :
Set when event listeners are registered on the XMLHttpRequestUpload object to determine
whether a preflight request is needed. Initially unset.
So we're just following the spec here.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•