Commit graph

381 commits

Author SHA1 Message Date
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
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
Guillaume Gomez
e1e2b61049 Remove stabilized features 2015-11-28 05:48:03 +01:00
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
bors-servo
a515fe320b Auto merge of #8516 - KiChjang:http-fetch-refactor, r=jdm
Refactor http_fetch to reflect the new standard

Partial #4576. The spec is really getting funky now - it's depending more and more on the DOM objects (e.g. prompting the user for authentication using a `Window` object). I think we can just pass in username and password as properties of the `Request` struct though.

I've also added in the async version for http_request.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8516)
<!-- Reviewable:end -->
2015-11-27 11:39:32 +05:30
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
Keith Yeung
7d3eb72a26 Refactor http_fetch to reflect the new standard 2015-11-26 17:12:19 -08:00
bors-servo
f96e8ce9e8 Auto merge of #8685 - jmr0:master, r=Ms2ger
tidy rule to warn against use of &String and refactoring

Fixes #8681

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8685)
<!-- Reviewable:end -->
2015-11-27 04:48:38 +05:30
bors-servo
831979d6a7 Auto merge of #8650 - Wafflespeanut:about-404, r=Wafflespeanut
Redirect to an error page on 404!

fixes #7658

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8650)
<!-- Reviewable:end -->
2015-11-26 22:47:03 +05:30
Ravi Shankar
b17ca9bdc1 Redirect to an error page when file's not found 2015-11-26 11:20:42 +05:30
jmr0
df49cf2b13 adding tidy rule to warn against use of &String and refactoring instances of &String in codebase 2015-11-25 21:49:12 -05:00
bors-servo
13a96fcaf7 Auto merge of #8660 - pcwalton:ipc-channel-errors, r=larsbergstrom
Update `ipc-channel` to pick up the improved error reporting.

Intended to help diagnose intermittent failures.

r? @jdm or @larsbergstrom (or whoever)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8660)
<!-- Reviewable:end -->
2015-11-25 07:31:15 +05:30
Simon Sapin
45ec900745 Remove dependency on regex_macros
This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
2015-11-24 22:07:14 +01:00
bors-servo
ed6a3f5022 Auto merge of #8609 - KiChjang:file-loader-headers, r=KiChjang
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 -->
2015-11-25 01:49:26 +05:30
Keith Yeung
af705a6faf Add content_type to metadata in file_loader 2015-11-24 11:52:35 -08:00
Patrick Walton
2843000810 Update ipc-channel to pick up the improved error reporting.
Intended to help diagnose intermittent failures.
2015-11-23 16:38:39 -08:00
Alex Gaynor
2d662aa4e7 Always disable SSLv2 and SSLv3.
These protocols have serious known weakness and our turned off in other browsers.
2015-11-21 12:11:48 -05:00
Alex Gaynor
008d99663f Fixed #8594 -- use a more modern default cipher suite list by default 2015-11-20 11:40:07 -05:00