Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XHR must not trigger any upload events when making GET or HEAD request with non-null data #3920

Open
mukilan opened this issue Nov 6, 2014 · 0 comments
Labels

Comments

@mukilan
Copy link
Contributor

@mukilan mukilan commented Nov 6, 2014

/XMLHttpRequest/send-entity-body-get-head-async.htm tests that no events (progress, loadstart, loadend) are fired on an the xhr.upload object when making a GET or HEAD request with non-null data.

The current implementation triggers the progess and loadend events on the upload object when the the state changes to HEADERS_RECEIVED irrespective of the method type, hence failing the assertion in the test.

The XHR spec clearly states that the request body is set to null when the method is either GET or HEAD (see step 3). This means that the rules in the HTTP Fetch spec, section 4.3 step 11, under "If HTTPRequest's body is non-null, run these substeps:" do not apply to GET and HEAD requests and therefore no events must be triggered on the xhr.upload object.

@mukilan mukilan changed the title Investigate whether the /XMLHttpRequest/send-entity-body-get-head-async.htm test is correct XHR must not trigger any upload events when making GET or HEAD request with non-null data Nov 7, 2014
@frewsxcv frewsxcv added the A-network label Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.