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

Servo isn't strict enough about what XMLHttpRequest response XML it will accept #24923

Open
pshaughn opened this issue Nov 29, 2019 · 1 comment
Open

Comments

@pshaughn
Copy link
Member

@pshaughn pshaughn commented Nov 29, 2019

WPT xhr/responsexml-basic, responsexml-media-type, and responsexml-non-well-formed reveal cases where an XMLHttpRequest shouldn't be producing an XML document but is:

  • an empty body
  • a body that's syntactically XML, but with a Content-Type header that says it's something else
  • lightly malformed XML

By WPT expectations and other browser behavior, these shouldn't parse into an XML document when they're the response to an XHR.

@jdm jdm added the A-content/dom label Nov 29, 2019
@jdm jdm added this to To do in web-platform-test failures via automation Nov 29, 2019
@pshaughn
Copy link
Member Author

@pshaughn pshaughn commented Dec 22, 2019

https://xhr.spec.whatwg.org/#document-response step 5 says "the result of running the XML parser", with explanatory language that this should fail if not well-formed. Servo's XMLHttpRequest::document_response calls ServoParser::parse_xml_document here, which does not have any way of returning a failure result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
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.