Implement support for missing XMLHttpRequest APIs
Josh Matthews edited this page Sep 17, 2015
·
1 revision
Background information: Servo implements many API specifications that are relied upon by the JavaScript that executes on pages all over the internet. One of these is XMLHttpRequest, which is used to make HTTP requests dynamically. Some of the less common features of this API are currently unimplemented in Servo, so addressing this shortfall will improve our compatibility with the web of today.
Initial steps:
- compile Servo and ensure that it runs on
tests/html/about-mozilla.html
- email the mozilla.dev.servo mailing list introducing your group and your progress
- uncomment the
overrideMimeType
API inXMLHttpRequest.webidl
, and add a stub method that allows Servo to compile again toxmlhttprequest.rs
. - run the tests via
./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/
and adjust the expectations for any that now pass (tests/wpt/metadata/XMLHttpRequest/
) - add new
override_charset
andoverride_mime_type
fields to theXMLHttpRequest
structure - implement the
overrideMimeType
steps described in the specification - update any tests that now pass
Subsequent steps:
- implement the specified behaviour for the
override MIME type
/final MIME type
andoverride charset
/final charset
(see uses offinal MIME type
in various places in the spec) - uncomment and implement the responseXML API and
document
response type (and associatedresponseType
behaviour) - support the
withCredentials
API- implement the XMLHttpRequest API and associated changes to other APIs (search for
withCredentials
) - implement basic network-level support by adding a member to
LoadData
that is used byhttp_loader.rs
to conditionally exclude cookies from the HTTP request if the flag is false (default true)
- implement the XMLHttpRequest API and associated changes to other APIs (search for