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 should create a headers object in file_loader #4212
Comments
|
For determining a Content-Type header, we could use https://github.com/cybergeek94/mime_guess . |
I'll see what I can do! |
For future reference, jdm's test uses a test harness that no longer exists. Since the replacement ( An alternative could be a unit test ( |
I'll take this one. |
I've gotten to the part where I've set |
Plausibly we don't actually want a headers object, since that's very HTTP specific. If we just make the content_type value available, that should be enough. |
We need to fake up some actual headers for XMLHTTPRequest... see https://fetch.spec.whatwg.org/#concept-basic-fetch . Granted, it would be reasonable to argue that we don't need to do that in the network layer, and we should construct the fake headers in For reference, the HTTP unit-tests manipulate Header objects in various ways: https://github.com/servo/servo/blob/master/tests/unit/net/http_loader.rs#L358 . |
Add content_type to metadata in file_loader Fixes #4212. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8609) <!-- Reviewable:end -->
Add content_type to metadata in file_loader Fixes #4212. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8609) <!-- Reviewable:end -->
Follow on issue to #3144
Currently when a file from the filesystem is loaded in servo, no response headers are generated. This prevents testing via XMLHttpRequest.
For reference:
http://pastebin.com/k3kyci7m
The text was updated successfully, but these errors were encountered: