Commit graph

1290 commits

Author SHA1 Message Date
Anthony Ramine
7214fba45b Bump openssl to 0.7.6 2016-03-16 23:42:21 -07:00
Anthony Ramine
a4d6d41665 Reorder dependencies in net/Cargo.toml 2016-03-16 23:36:04 -07:00
Anthony Ramine
f7af675861 Update log to 0.3.5 2016-03-16 23:36:04 -07:00
Ms2ger
91d63d5fcf Use a match rather than unwrap() in main_fetch. 2016-03-10 14:07:41 +01:00
Anthony Ramine
b66d190166 Bump url to 0.5.7 2016-03-09 20:15:16 +01:00
Ms2ger
3e3053653e Fix warnings in the fetch code. 2016-03-09 16:12:15 +01:00
bors-servo
162e89d8c6 Auto merge of #9780 - bobthekingofegypt:github_hsts_bug, r=jdm
correctly send secure cookies after hsts url match

Fixes #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9780)
<!-- Reviewable:end -->
2016-03-09 15:13:52 +05:30
Ms2ger
8b629652ac Make Response::new() an inherent method.
There is no real reason to put this in an extension trait.
2016-03-08 17:55:18 +01:00
bors-servo
fee7cb179e Auto merge of #9850 - nikkisquared:2_async_2_furious, r=jdm
Set response.body Asynchronously In Fetch

Following having finished making Fetch asynchronous, response.body should be set asynchronously, since it's the major goal of calling Fetch. So far, I've made the body wrapped in Arc<Mutex<>>, and I've wrapped a new thread around the part where it's set. I've also discovered that the fetch_async function makes step 8 of Main Fetch obsolete, and I've commented it appropriately.

I'm currently having a hard time with the thread for setting response.body, though. @jdm suggested I have the body set continually, block by block, but my implementation for that runs so slow that I can't finish running my fetch test suite in reasonable time. @KiChjang pointed out that a lot of the lag is due to how response.body currently stores everything inside a Vec. Changing the storage container seems to be both necessary and beyond the scope of the time I have to work on this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9850)
<!-- Reviewable:end -->
2016-03-08 04:45:25 +05:30
Nikki
b187985e49 set response.body asynchronously in Fetch 2016-03-07 15:09:39 -07:00
Ms2ger
d5b559c37c Bonus fix: Rewrite get_image_or_meta_if_available in an imperative style.
I believe this is more readable.
2016-03-07 14:30:23 +01:00
Ms2ger
1064c3dca0 Move the receivers out of the ImageCache struct. 2016-03-07 14:29:49 +01:00
Ms2ger
9c75ddfe66 Inline ImageCache::do_run. 2016-03-07 14:15:47 +01:00
Ms2ger
9c4f2265d0 Use the select! macro in ImageCacheThread. 2016-03-07 14:13:33 +01:00
Ms2ger
6de127a343 Move the ImageCacheThread's closure into a function. 2016-03-07 14:08:41 +01:00
Anthony Ramine
7c1dd54895 Update to Rust 2016-03-05 2016-03-06 10:36:49 +01:00
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
Bob
17e6007685 send correct url to devtool on request
Send url that was not modified by the hosts file to the dev tools
2016-03-03 17:15:29 +00:00
Nikki
3f79667050 implementing working demonstration of calling Fetch asynchronously 2016-03-01 13:02:38 -07:00
Bob
06ffdd68e8 refactor http_loader hostname/htst order
Changed hostname rewrite to happen inside obtain response after any htst
changes.  Removed  url from load leaving just doc_url to avoid confusion
2016-03-01 18:10:58 +00: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
Bob
759099c78d correctly send secure cookies after hsts url match
Fix for #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.
2016-02-27 15:16:53 +00: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