Commit graph

1020 commits

Author SHA1 Message Date
Anthony Ramine
85e2648ffc Update ipc-channel to 0.6.3 2017-02-16 12:04:32 +01:00
Glenn Watson
4cbefe82b5 Update WR (radial gradients, subpixel positioning, tiling changes). 2017-02-01 05:40:44 +10:00
Ms2ger
f4ab3ac54d Remove unused part of the return value of parse_blob_url(). 2017-01-30 15:16:27 +01:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Frederick F. Kautz IV
5f3339d22a Renaming default_features to default-features as per Cargo's Manifest Format 2017-01-08 19:24:19 -08:00
bors-servo
8fff2f29d0 Auto merge of #14895 - dowoncha:request-websocket, r=jdm
Added Websocket to RequestMode enum

Added Websocket to RequestMode enum
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14785  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because matching the enum should have default control flow.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14895)
<!-- Reviewable:end -->
2017-01-08 08:57:52 -08:00
Dowon Cha
8bf924dc79 Added Websocket to RequestMode enum
set unreachable in dom/request.rs for websocket

fixed imports
2017-01-08 09:17:53 -05:00
mrnayak
a3026499f4 Implement Subresource Integrity
Implemented response validation part of
https://w3c.github.io/webappsec-subresource-integrity/.
Implemented step eighteen of the main fetch. If a request has integrity
metadata, then following steps are performed
*Wait for response body
*If the response does not have a termination reason and response does not
match request’s integrity metadata, set response to a
network error.# Please enter the commit message for your changes. Lines starting
2017-01-08 08:52:18 +05:30
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Josh Holmer
f2e748588c Use tinyfiledialogs from crates.io 2017-01-05 16:59:44 -05:00
bors-servo
987b640c54 Auto merge of #14784 - mattnenterprise:fetch-api-updates, r=jdm,KiChjang
Updating http_network_or_cache_fetch to better match the fetch API spec

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14742

<!-- Either: -->
- [x] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14784)
<!-- Reviewable:end -->
2017-01-02 11:30:51 -08:00
Matt McCoy
09194a15ac Updating http_network_or_cache_fetch to better match the fetch API spec 2017-01-02 12:00:57 -05:00
Raghav
6a14349eb1 Refactor HSTSList to use HashMap
Refactored HSTSList to use HashMap, where the key of HashMap is the base
domain. Every time when we check if a host is secure, we find the base
domain of the host and get a vector of HSTS entries associated with the
base domain.

While this will not give O(1) look up time, we would have a smaller list
to iterate for every lookup. I have added one unit test to validate
HashMap changes.
2016-12-30 22:00:03 +05:30
Raghav
6020b4c15c Implement HSTS fetch step
Implemented step nine of the main fetch. If current URL scheme is 'HTTP'
and current URL's host is domain and if current URL's host matched with
Known
HSTS Host Domain Name Matching results in either a superdomain match with
an asserted includeSubDomains directive or a congruent match then we
change request scheme to 'https'. This change has been made in method.rs

A test case to validate this has been added in fetch.rs. For asserting
https scheme, a https localhost was required. For this purpose I have
created a self-signed certificate and refactored fetch-context and
connector.rs to programmatically trust this certificate for running this
test case.
2016-12-29 12:55:31 +05:30
Matt McCoy
ed075ab552 Reuse the http connector pool between fetches 2016-12-26 19:39:11 -05:00
Rohit Burra
3fce260f6e Check wss scheme in Cookie::appropriate_for_url 2016-12-25 09:14:06 +05:30
Rohit Burra
49abf57deb Refactor to use ServoUrl::is_secure_scheme 2016-12-25 09:13:21 +05:30
bors-servo
de7d73adb0 Auto merge of #14623 - DominoTree:master, r=emilio
<!-- Please describe your changes on the following line: -->
Add check for bad ports to http_fetch(), return NetworkError::Internal if bad port/schema combination is seen.

Test added

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14514 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14623)
<!-- Reviewable:end -->
2016-12-24 03:41:14 -08:00
Nick Price
a56a7baa9a Implement port-based blocking 2016-12-21 09:43:39 -05:00
Keith Yeung
63a7e8efdf Add domain and path checks for secure cookies eviction 2016-12-21 03:39:38 -08:00
Keith Yeung
64b456f0e2 Conform conditionals regarding cookie removal with spec 2016-12-20 11:53:30 -08:00
Simon Sapin
53f5023685 Fix/silence some warnings 2016-12-20 07:07:06 +01:00
bors-servo
bde8dce756 Auto merge of #14526 - frewsxcv:cookies, r=jdm
Attempt at refactoring and simplifying 'set cookies' operations on resource thread.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14526)
<!-- Reviewable:end -->
2016-12-15 15:54:39 -08:00
Corey Farwell
77d2f9de36 Refactor and simplify 'set cookies' operations on resource thread. 2016-12-15 15:34:04 -05:00
Ms2ger
1e0ab08c42 Stop returning the response from fetch(). 2016-12-15 10:50:15 +01:00
Ms2ger
217f44b67a Make the fetch target non-optional. 2016-12-15 10:49:04 +01:00
Ms2ger
8a4a5c0cb5 Avoid unlocking the response body while it is in an inconsistent state. 2016-12-15 10:12:13 +01:00
bors-servo
fde9ac1768 Auto merge of #14586 - deror1869107:Remove-ResponseAction, r=jdm
Remove-ResponseAction

<!-- Please describe your changes on the following line: -->
Remove the old Enum ResponseAction and use net_traits::FetchResponseMsg instead.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13717 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because @KiChjang said so.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14586)
<!-- Reviewable:end -->
2016-12-14 20:34:01 -08:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
deror1869107
55dddc8c41 Remove-ResponseAction
Remove redundant code
2016-12-15 01:16:52 +08:00
Ms2ger
cd40bb54ae Remove ProgressSender. 2016-12-13 17:15:12 +01:00
Ms2ger
1f9d7ddf4d Remove unused send_error, start_sending_sniffed_opt. 2016-12-13 17:14:53 +01:00
Ms2ger
1222db62aa Remove Request::done.
It does not appear to be used at all.
2016-12-09 12:36:46 -10:00
bors-servo
882d5512bb Auto merge of #14508 - servo:determine_request_referrer, r=jdm,frewsxcv
Rewrite determine_request_referrer() to explicitly limit it to the checks it can do.

Checks for the Client value should reside in the script thread.

I also noted some other issues in this code.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14508)
<!-- Reviewable:end -->
2016-12-09 13:13:27 -08:00
bors-servo
da2f41ba13 Auto merge of #14502 - servo:filter-map, r=frewsxcv
Replace an unidiomatic use of filter_map().

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14502)
<!-- Reviewable:end -->
2016-12-08 15:12:42 -08:00
bors-servo
fffdcc1d7d Auto merge of #14501 - servo:LoadError, r=Manishearth
Remove LoadError.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14501)
<!-- Reviewable:end -->
2016-12-08 14:22:17 -08:00
Ms2ger
fb456402b0 Replace an unidiomatic use of filter_map(). 2016-12-08 12:13:53 -10:00
Ms2ger
12aa4694cb Rewrite determine_request_referrer() to explicitly limit it to the checks it can do.
Checks for the Client value should reside in the script thread.

I also noted some other issues in this code.
2016-12-08 12:05:44 -10:00
Ms2ger
87979ef65e Remove LoadError. 2016-12-08 10:25:23 -10:00
Ms2ger
3a27fda368 Stop handling a None referrer policy in determine_request_referrer(). 2016-12-08 09:39:41 -10:00
Raghav
c1518adba8 Redesign CookieStorage and Implement Leave Secure Cookie Alone
CookieStorage has been refactored to use HashMap with base domain as the
key. Values of hashmap is vector of cookies.
CookieStorage now has max_per_host which restricts maximum cookies that
can be added per base domain.
Cookie eviction doesnot take place if max_per_host is not reached.
Cookie eviction logic implemented here does following steps
1) Evict all expired cookies
2) Remove oldest accessed non-secure cookie If any
3) When no non-secure cookie exist, remove oldest accessed secure cookie
if new cookie being added is secure. Else ignore new cookie
2016-12-04 16:29:38 -05:00
Michael Mokrysz
52194c01d5 Made http_redirect_fetch error for non-HTTPS. #14069 2016-11-30 20:46:27 +00:00
bors-servo
a093b56c84 Auto merge of #14362 - servo:fetch-http-move, r=Wafflespeanut
Simplify the http_loader code.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14362)
<!-- Reviewable:end -->
2016-11-25 20:20:26 -08:00
bors-servo
e1eff691f8 Auto merge of #14286 - gterzian:update_canvas_with_offscreen_context, r=jdm
Update to webrender 0.10.0

<!-- Please describe your changes on the following line: -->

Changes necessary to build servor with webrender 0.10.0

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14286)
<!-- Reviewable:end -->
2016-11-24 12:29:52 -08:00
Glenn Watson
3d67c1cf4c Remove old shaders, updates for WR feature and API changes. 2016-11-25 06:28:21 +10:00
Ms2ger
7192a747f2 Remove WrappedHttpRequest. 2016-11-24 16:14:54 +01:00
Ms2ger
04d5f6e7fa Inline WrappedHttpRequest::send(). 2016-11-24 14:00:44 +01:00
Ms2ger
53856bf312 Simplify obtain_response() a little. 2016-11-24 14:00:43 +01:00
Ms2ger
47fa025e89 Return an io::Result from StreamedResponse::from_http_response(). 2016-11-24 14:00:42 +01:00
Ms2ger
c20d647b61 Remove StreamedResponse::new(). 2016-11-24 14:00:41 +01:00