Commit graph

397 commits

Author SHA1 Message Date
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
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
Nikki
c5982872c8 rewrapped Rc<RefCell<Response>> into Rc<Response> 2016-01-08 12:17:13 -07:00
Nikki
67f4df5d3a changed Rc<RefCell<Request>> into Rc<Request> 2016-01-07 12:16:01 -07:00
Keith Yeung
05dc512055 Extract Response from net_traits/lib.rs 2016-01-06 09:45:22 -05:00
Nikki
af310f7874 minimal implementation of http_network_fetch for testing purposes 2016-01-05 12:14:07 -07:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
bors-servo
7371da6ca0 Auto merge of #9078 - nikkisquared:split_http_loader_load, r=jdm
Split http_loader::load into two methods

This is intended to fix #8976 by moving the http_loader::load code that deals with getting a response and moving it into its own function. I've built it and run existing tests against my changes and that looks fine. I'd like feedback on changes I've made to accommodate refactoring the code. And I'm sure there's a more descriptive function name than "load_response", I just wasn't sure how to describe what it does.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9078)
<!-- Reviewable:end -->
2016-01-01 01:48:09 +05:30
Josh Matthews
3d8881c6f2 Remove unneeded dead_code annotations. 2015-12-31 07:45:50 -05:00
Josh Matthews
cca25e2b3a Enable MIME sniffing via a pref instead of a global option. 2015-12-31 07:45:49 -05:00
Josh Matthews
9601d555cd Use valid MIME types in the font classifier. 2015-12-31 07:45:48 -05:00
David Rajchenbach-Teller
1e81b8c133 Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing.
Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
2015-12-31 07:45:03 -05:00
Nikki
f665858271 Fixes #8976: Split load() into process_response() 2015-12-29 17:19:22 -07:00
Nikki
d30998c4a6 Partial implementation of HTTP-network-or-cache fetch step. 2015-12-29 16:37:11 -05:00
Abhishek Kumar
f889b1ccd7 Support responseCookies, responseContent, responseHeaders, requestCookies, getResponseHeaders,
getResponseContent, getRequestPostData, getRequestCookies, getResponseCookies, getEventTimings and
getSecurityInfo message for network devtools

Fixing Indentation
2015-12-21 10:28:40 -05:00
Mathieu Agopian
11234f5370 Use Url.join instead of UrlParser.base_url(...).parse (#9002) 2015-12-18 17:02:41 +01:00
jmr0
7d0bede8ba adding initial support for websocket subprotocol negotation 2015-12-17 09:17:15 -05:00
Tetsuharu OHZEKI
e8c12c1c6d Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all 2015-12-10 16:49:29 -05:00
Nova Fallen
e8c8277f34 move websocket creation to resource task 2015-12-08 02:04:40 -05:00
Jigesh Mehta
ce3c9ff57c implement support for withCredentials 2015-12-04 16:34:30 -05:00
bors-servo
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
bors-servo
595bda478e Auto merge of #8752 - Manishearth:om-nom, r=metajack
Make `path_matches` match the spec (fixes cookies)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8752)
<!-- Reviewable:end -->
2015-11-30 23:18:39 +05:30
Manish Goregaokar
f8d906be10 Make path_matches match the spec (fixes cookies) 2015-11-30 22:01:33 +05:30
bors-servo
d48d8b3ea1 Auto merge of #8713 - GuillaumeGomez:features, r=Manishearth
Remove stabilized features

Fixes #8706.

cc @KiChjang

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8713)
<!-- Reviewable:end -->
2015-11-28 21:58:43 +05:30
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30