Commit graph

833 commits

Author SHA1 Message Date
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
bors-servo
3af2586b8e Auto merge of #14208 - servo:CookieStorage-debug, r=jdm
Derive Debug for CookieStorage.

<!-- 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/14208)
<!-- Reviewable:end -->
2016-11-22 07:45:20 -06:00
Gregory
fb98acbc4d update deps
switch to using webrender_traits::ImageData

update use of webrender_traits::StackingContext in layout

use webrender_traits::channel::msg_channel in webgl ipc

fix use of resource_override_path in components/servo/lib
2016-11-22 07:46:42 +10:00
Ms2ger
ae1340bf50 Pass the UIProvider to FileManager::handle() as needed. 2016-11-21 10:37:26 +01:00
Ms2ger
f672bf9eab Factor out FileManager::promote_memory(). 2016-11-21 10:37:25 +01:00
Ms2ger
5ce869d58a Factor out FileManager::read_file(). 2016-11-21 10:37:24 +01:00
Ms2ger
508e6adb7e Stop cloning FileManager::store so much. 2016-11-21 10:37:23 +01:00
Ms2ger
95ccd2d08f Move the UIProvider from FileManagerStore to FileManager.
This will allow us to reduce the amount of code that needs to care about it.
2016-11-21 10:37:22 +01:00
bors-servo
ac6a2681ae Auto merge of #14274 - stshine:servo-url-index, r=emilio
Implement range index with the Position enum on ServoUrl

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

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

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

r? @emilio

<!-- 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/14274)
<!-- Reviewable:end -->
2016-11-20 12:35:14 -06:00
Anthony Ramine
7a8c5ae8e3 Use FnvHasher in http_loader::load
Should help with #11100.
2016-11-19 14:10:37 +01:00
Pu Xingyu
0818b44459 Implement range index with the Position enum on ServoUrl 2016-11-18 17:46:36 +08:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Ms2ger
9e8dd86363 Derive Debug for CookieStorage. 2016-11-14 18:17:11 +01:00
Ms2ger
56dd6417e6 Remove the network.http.redirection-limit preference.
The Fetch standard defines this value as twenty; there is no good reason to
allow changing that at runtime.
2016-11-14 14:44:08 +01:00
bors-servo
e3f07dfa16 Auto merge of #14156 - frewsxcv:cors-capitalization, r=KiChjang
Update CORS naming from 'CORS' to 'Cors'.

As per:

https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430]

Acronyms should be considered one word and not all caps.

<!-- 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/14156)
<!-- Reviewable:end -->
2016-11-10 14:43:36 -06:00
Ms2ger
15b55c3231 Make Response::url private. 2016-11-10 13:18:43 +01:00
Ms2ger
c1e1695f66 Pass the URL to Response::new(). 2016-11-10 13:17:02 +01:00
Corey Farwell
bf8752ac9e Update CORS naming from 'CORS' to 'Cors'.
As per:

https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430]

Acronyms should be considered one word and not all caps.
2016-11-09 18:30:30 -05:00
bors-servo
99f1257210 Auto merge of #14145 - glennw:update-wr-remove-shaders, r=pcwalton
Update WR - stride support, remove deprecated / unused shaders.

<!-- 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/14145)
<!-- Reviewable:end -->
2016-11-09 04:50:45 -06:00
bors-servo
3410242df8 Auto merge of #14133 - servo:debug-net-devtools, r=nox
Log debug messages when devtools is not notified about a HTTP request.

<!-- 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/14133)
<!-- Reviewable:end -->
2016-11-09 00:32:02 -06:00
Glenn Watson
1f00931045 Update WR - stride support, remove deprecated / unused shaders. 2016-11-09 13:35:14 +10:00