Commit graph

1003 commits

Author SHA1 Message Date
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
Ms2ger
4d9f9feb1c Remove StreamedResponse::metadata. 2016-11-24 14:00:40 +01:00
Ms2ger
d9947cdf7b Avoid some unnecessary Options in http_network_fetch. 2016-11-24 14:00:39 +01:00
Ms2ger
f24be9ad51 Remove the HttpResponse trait. 2016-11-24 14:00:38 +01:00
Ms2ger
87fd4a2d79 Remove the HttpRequest trait. 2016-11-24 14:00:37 +01:00
Ms2ger
fc6fa56af5 Remove the HttpRequestFactory trait. 2016-11-24 14:00:36 +01:00
Ms2ger
38db554b5e Move the http-specific fetch code to http_loader. 2016-11-24 14:00:35 +01:00
Ms2ger
675d8f518c Unify ReadResult and Data. 2016-11-24 14:00:34 +01:00
Ms2ger
74ea269fc3 Use url::Origin as UrlOrigin in http_loader. 2016-11-24 14:00:32 +01:00
Ms2ger
6219105eed Use more specific names for Hyper's Request/Response types in http_loader. 2016-11-24 14:00:31 +01:00
Ms2ger
761524c01b Remove some unused arguments.
The change to the unit test is necessary because the resource thread is not
resilient against either of these Senders being dropped while the resource
thread is running. Before this change, it held clones of those senders itself
(public_setup_chan_clone, private_setup_chan_clone).
2016-11-24 11:46:33 +01:00
Ms2ger
69f856486a Remove unused CancellableResource and CancellationListener types. 2016-11-24 11:46:32 +01:00
Ms2ger
7913f3adaf Remove the unused CancellationListener arguments in filemanager_thread. 2016-11-24 11:46:30 +01:00
Ms2ger
5febfdc4d6 Remove unused UIProvider trait definition. 2016-11-24 11:46:29 +01:00
Ms2ger
ffc2e09ea7 Remove unused CancellationListener argument to obtain_response. 2016-11-24 11:46:26 +01:00
Ms2ger
fb1279ec3a Remove CoreResourceMsg::Load.
Also remove now-dead code that rustc warns about.

It turns out that we lost support for some of our custom URL schemes; I intend
to reimplement them, but I believe this will be significantly easier to do
once the legacy code is out of the way.
2016-11-24 11:46:24 +01:00
Ms2ger
15e8f4f0d4 Properly exit the core resource thread. 2016-11-24 11:46:22 +01:00
Ms2ger
2dc73d8789 Rewrite test_redirect_from_x_to_x_provides_x_with_cookie_from_first_response. 2016-11-23 22:35:33 +01:00