Commit graph

421 commits

Author SHA1 Message Date
Corey Farwell
75353e19a7 Indicate components should not be published to crates.io.
http://doc.crates.io/manifest.html#the-publish--field-optional
2016-03-03 15:04:44 -05:00
Nikki
3f79667050 implementing working demonstration of calling Fetch asynchronously 2016-03-01 13:02:38 -07:00
bors-servo
4a7d234510 Auto merge of #9768 - jdm:add_disallowed_prefixes, r=jdm
disallow restricted XMLHttpRequest header prefixes

Rebased from #9376.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9768)
<!-- Reviewable:end -->
2016-02-27 22:09:46 +05:30
Chandler Abraham
3a949b77b2 don't unconditionally override header 2016-02-27 10:47:13 -05:00
Keith Yeung
96971244ac Update fetch attributes to match the new spec 2016-02-27 08:40:09 -05:00
bors-servo
26b40afe23 Auto merge of #9757 - jdm:websocket-errors-rebase, r=jdm
Trigger WebSocket error event

Trigger a WebSocket error after receiving an invalid message from the server. Rebased from #8868. Fixes #7861.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9757)
<!-- Reviewable:end -->
2016-02-26 14:14:06 +05:30
Sam Gibson
4f736e6f7c Trigger WebSocket error event
Trigger a WebSocket error after receiving an invalid message from the server
2016-02-26 09:43:12 +01:00
bors-servo
32c97b6c8d Auto merge of #9631 - jongiddy:remove-extra-mask-byte, r=jdm
Validate MIME pattern checking

The MIME detector for a HTML file contains an additional byte in the mask.  While it doesn't hurt, it is not used in the byte matching code (since it is zipped with the `pattern` iterator).

I'm not clear how to test this within the `servo` code. The fix doesn't change any externally visible behavior. A test to validate the `ByteMatcher` structures would require the private ByteMatcher structures to be visible to the test. I could use a sub-module, as described at https://doc.rust-lang.org/book/testing.html#the-tests-module but this pattern doesn't appear anywhere else in the `servo` code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9631)
<!-- Reviewable:end -->
2016-02-26 02:57:44 +05:30
Corey Farwell
83b22fd97f Update webrender crate refs to reflect ownership change.
Also updated the 'webrender' ref to point to the latest commit.
2016-02-23 19:49:50 -05:00
Jonathan Giddy
4721fd1c6a Fix PDF signature to match spec 2016-02-23 14:09:56 +00:00
Jonathan Giddy
6ea656c6c5 Add check that ByteMatcher pattern has the mask applied 2016-02-23 13:46:53 +00:00
Jonathan Giddy
480cb385fc Fix off-by-one error in MIME pattern matching
This adds a size to the test webp file, since the error fixed occurs
when the test object is the same length as the matched pattern, and
is not equal to the pattern.
2016-02-23 11:53:32 +00:00
Jonathan Giddy
94f5d26131 Use content-type for error message 2016-02-23 10:54:54 +00:00
Jonathan Giddy
ab43e2b028 Ogg has a 5-byte signature, but pattern did not include NUL 2016-02-19 16:51:40 +00:00
Simon Sapin
4c72be6911 Update websocket 2016-02-19 15:34:41 +01:00
Jonathan Giddy
54b07bae91 Fix invalid MIME checkers 2016-02-19 13:11:41 +00:00
Jonathan Giddy
208bae7f2e Add validation code for MIME checkers 2016-02-19 13:11:13 +00:00
bors-servo
ab07b06823 Auto merge of #9589 - glennw:webrender, r=pcwalton
Add WebRender integration to Servo.

WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9589)
<!-- Reviewable:end -->
2016-02-19 00:54:06 +05:30
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
bors-servo
88afe38092 Auto merge of #9608 - nikkisquared:implement_http_redirect_fetch, r=jdm
Implementation of HTTP Redirect Fetch step

I've made a first draft of a complete implementation of HTTP Redirect Fetch, most of which is just refactored out of HTTP Fetch. I've also made some minor changes in a few other steps, all collected in the second commit, based on recent changes to the Fetch Standard. Since HTTP Redirect Fetch is so new, I figured now would be a fine time to make those other changes.

The biggest thing on my mind right now is how the spec says[1] "This algorithm will be used by HTML's "navigate" algorithm in addition to HTTP fetch above." This makes me think that this function, as well as HTTP Fetch, need to public, or at least have a public-facing function- since each Fetch function takes an Rc<Request>, which might be weird to require callers to supply.

[1] https://fetch.spec.whatwg.org/#http-redirect-fetch

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9608)
<!-- Reviewable:end -->
2016-02-18 05:54:51 +05:30
bors-servo
bc034845b7 Auto merge of #9662 - rebstar6:websocket_cookies, r=jdm
Add support for websocket cookies

Addresses both cookies in request and response. Resolves #9540.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9662)
<!-- Reviewable:end -->
2016-02-18 02:44:01 +05:30
Nikki
cf607606e0 implement http redirect fetch, and various Fetch Standard updates 2016-02-17 12:52:24 -07:00
Rebecca
cf6fd6dafe Add support for websocket request and response cookies
Also change expected behavior to pass for all in tests/wpt/web-platform-tests/websockets/cookies
2016-02-17 14:50:52 -05:00
Daniel Robertson
4d15b02dde Handle credentials in modify_request_headers
Handle credentials and set the apropriate header in
`modify_request_headers`.
2016-02-15 06:47:47 +00:00
Jonathan Giddy
8950d7aa6d Remove extra mask byte in MIME type detection 2016-02-14 08:18:14 +00:00
Anthony Ramine
680c817d53 Bump url to 0.5.5 2016-02-13 00:08:12 +01:00
Jonathan Giddy
ec0ea465ec Calculate mp4 header length correctly. 2016-02-12 17:39:34 +00:00
bors-servo
f1018b84a8 Auto merge of #9525 - nikkisquared:test_filtered_responses, r=asajeffrey
Test filtered responses and implement Cors Check Fetch step

I've been writing tests for creating filtered responses. So far I have three of the four types being made (namely, Basic, CORS, and Opaque), and just need to figure out how to make an OpaqueRedirect filtered response, since it's handled separately from the others. I will also add more tests to ensure the content of the filtered responses matches the limitations placed by the specification.

Along the way I implemented Cors Check, since it's required for the CORS filtered response. @jdm suggested I handle it in here, since it's such a small step, compared to other parts of Fetch.

Since all the tests currently pass, and I've spent a while adding the Cors Check and other pieces, I figured now would be a good time to start having it reviewed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9525)
<!-- Reviewable:end -->
2016-02-10 03:11:22 +05:30
Nikki
e8665d47ea working on implementing Cors Check and Origin to Ascii serialisation 2016-02-09 13:51:35 -07:00
bors-servo
3d63f09361 Auto merge of #9244 - paulrouget:securitychange, r=jdm
mozbrowsersecuritychange event

Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9244)
<!-- Reviewable:end -->
2016-02-09 13:00:29 +05:30
Paul Rouget
63519c3574 mozbrowsersercuritychange event 2016-02-09 08:05:17 +01:00
bors-servo
3498deca39 Auto merge of #9542 - timvandermeij:immeta, r=jdm
Update immeta dependency to resolve ImageCacheThread panic

Fixes #9501.

Before this patch, a website such as http://www.universiteitleiden.nl would consistently crash Servo. After this patch, the website loads just fine.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9542)
<!-- Reviewable:end -->
2016-02-06 04:02:47 +05:30
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
Tim van der Meij
f4f42b260b Update immeta dependency to resolve ImageCacheThread panic 2016-02-04 21:58:43 +01:00
bors-servo
dcf4218e30 Auto merge of #9121 - simartin:issue_9095, r=jdm
Issue #9095: Send a notification when a file load is cancelled.

Fixes https://github.com/servo/servo/issues/9095

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9121)
<!-- Reviewable:end -->
2016-02-03 23:29:35 +05:30
Keith Yeung
9b23839394 Update rust-url 2016-02-02 20:04:01 -05:00
bors-servo
46b3eb6535 Auto merge of #9208 - jmr0:master-img, r=asajeffrey
Use image metadata to lay out images

Fixes #7047.

cc: @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9208)
<!-- Reviewable:end -->
2016-01-31 01:18:41 +05:30
jmr0
167ffa7a95 adding image metadata notification capabilities to image cache 2016-01-29 20:54:49 -05:00
Nikki
db8cc6eccf Partial implementation of Main Fetch step, including appropiate updates to tests 2016-01-29 12:40:54 -07:00
Nikki
5426df32de tests for boundary conditions on redirect_count in fetch 2016-01-20 13:03:08 -07:00
James Sanders
d121958a17 Make closing related code more clear and more correct 2016-01-18 17:37:16 -07:00
Nikki
4165786767 Test setting response.body by fetching on a server 2016-01-18 15:12:31 -07:00
bors-servo
ce0b89d310 Auto merge of #9362 - KiChjang:move-fetch-request, r=Ms2ger
Rename net/fetch/request.rs to net/fetch/methods.rs and move Request …

…to net_traits.

Also updated unit tests to correctly reference and use Request and Fetch methods.

This is in preparation for XHR and EventSource (possibly WebSocket as well), which rely on using Request, but we cannot make the script crate depend upon the net crate.

cc @nikkisquared @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9362)
<!-- Reviewable:end -->
2016-01-18 16:05:56 +05:30
Keith Yeung
a53661f6c8 Rename net/fetch/request.rs to net/fetch/methods.rs and move Request to net_traits 2016-01-18 00:57:19 -05:00
Matthew Kuo
9d2eacf039 Remove remaining unused imports 2016-01-17 20:55:53 -08:00
bors-servo
9c713cb468 Auto merge of #9298 - nikkisquared:test_fetch, r=KiChjang
Implement a basic test for Fetch

As per @jdm's suggestion that I start minimally testing the Fetch protocol to catch any errors, I wrote a very simple test that just calls Fetch and checks that the response isn't a network error. I've made changes as necessary for every failure I encountered, although this doesn't mean the implementation is faultless yet.

As always, I look forward to any feedback for improvements regarding the test itself, the changes to the fetch files I've made, and anything that I missed and should update.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9298)
<!-- Reviewable:end -->
2016-01-14 08:20:05 +05:30
Nikki
5a8c533755 Implement a basic test for Fetch and fix errors it finds 2016-01-13 16:45:57 -07:00
Ms2ger
86d3c576f2 Remove some unused extern crates. 2016-01-13 09:37:28 +01:00
Simon Martin
3f3e50574a Issue #9095: Send a notification when a file load is cancelled. 2016-01-10 14:06:03 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00