Commit graph

1290 commits

Author SHA1 Message Date
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
Ms2ger
234b47e33e Pass a borrowed fetch context to fetch().
This will allow inspecting its state after fetching in unit tests.
2016-11-08 18:01:23 +01:00
Ms2ger
783f754d09 Log debug messages when devtools is not notified about a HTTP request. 2016-11-08 14:49:45 +01:00
bors-servo
32a953f0ba Auto merge of #14106 - servo:deindent-http-network-fetch, r=nox
Deindent some of the code in http_network_fetch.

<!-- 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/14106)
<!-- Reviewable:end -->
2016-11-08 00:03:24 -06:00
bors-servo
4a7ea72429 Auto merge of #14114 - servo:fetch-unit-http, r=jdm
Start using fetch for the HTTP unit tests.

<!-- 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/14114)
<!-- Reviewable:end -->
2016-11-07 22:04:27 -06:00
Ms2ger
d777016b3a Use set_default_accept_language in fetch_with_cors_cache. 2016-11-07 19:42:16 +01:00
bors-servo
3b5d1f2814 Auto merge of #14105 - servo:rm-rc, r=nox
Stop unnecessarily wrapping the response argument to http_redirect_fetch in Rc.

<!-- 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/14105)
<!-- Reviewable:end -->
2016-11-07 11:47:37 -06:00
bors-servo
dd34b2a335 Auto merge of #14059 - mrnayak:refPolicy, r=nox
Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr…

This pull request contains commit implementing initial steps for Improving Network Security project. As part of initial steps referer policy enums for strict-origin and strict-origin-when-cross-origin have been added to [hyper](https://github.com/hyperium/hyper/pull/943). Unit tests and additional logic has been added to handle these policies. Since enum changes are available on hyper version 0.9.11. We had to update hyper version to 0.9.11.

Hyper 0.9.11 depends on num_cpus 1.1.0. To avoid different version of num_cpus. We have updated rayon version from 0.4.0 to 0.4.3. Cargo.toml of util, style, geckolib, stylo component has been updated to use num_cpus version 1.1.0 instead of 0.2.2.

---
<!-- 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
- [ ] 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. -->

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.

<!-- 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/14059)
<!-- Reviewable:end -->
2016-11-07 04:37:35 -06:00
Ms2ger
14bd876400 Stop creating an unused Response in the error case. 2016-11-07 09:47:27 +01:00
Ms2ger
40c6b21fd7 Deindent some of the code in http_network_fetch. 2016-11-07 09:47:26 +01:00
Ms2ger
621d018dbd Stop unnecessarily wrapping the response argument to http_redirect_fetch in Rc. 2016-11-07 09:37:21 +01:00
Ms2ger
88285b6534 Privatize the chrome_loader module. 2016-11-06 12:18:40 +01:00
Ms2ger
a888f075a1 Privatize the http_loader module. 2016-11-06 12:18:39 +01:00
Ms2ger
697275dea3 Privatize some net modules. 2016-11-06 12:18:37 +01:00
Raghav
e0e734fa7f Remove return and resolve merge conflicts
Since last execution statement is the value which is returned, return
keyword has been removed from method strict_origin and
strict_origin_when_cross_origin.

Merge conflicts in Cargo.lock has been handled
2016-11-04 13:27:08 -04:00
Raghav
26dac98546 Code review comments and upstream merge conflicts
Incorporated code review comments in components/net/http_loader.rs
Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in
lib.rs
2016-11-04 11:18:22 -04:00
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
Raghav
c24aa56377 Network Security : Implement StrictOrigin and StrictOriginWhenCrossOrigin
Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.
2016-11-04 03:17:04 -04:00
bors-servo
ce725c9475 Auto merge of #13646 - asajeffrey:script-lookup-iframes-by-frameid, r=ConnorGBrewster
Script lookup iframes by frameid

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

Lookup iframes by `FrameId` rather than `PipelineId`. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa
---

<!-- 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 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. -->

<!-- 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/13646)

<!-- Reviewable:end -->
2016-11-03 18:11:05 -05:00
Alan Jeffrey
f3993d99b9 Lookup frames by frame_id, not pipeline_id. 2016-11-03 15:39:51 -05:00
bors-servo
738f0eb974 Auto merge of #14044 - servo:bluetooth, r=emilio
Split the bluetooth code out from the net crates.

<!-- 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/14044)
<!-- Reviewable:end -->
2016-11-03 15:04:43 -05:00
bors-servo
05f4512433 Auto merge of #14042 - servo:fetch-unit-data, r=nox
Rewrite the data_loader test with fetch.

<!-- 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/14042)
<!-- Reviewable:end -->
2016-11-03 13:04:48 -05:00
Ms2ger
4fbe415e80 Split the bluetooth code out from the net crates. 2016-11-03 16:45:07 +01:00
Ms2ger
6fcbc5b3ea Make the data_loader module private. 2016-11-03 11:54:11 +01:00
Anthony Ramine
a9767333eb Remove #![feature(custom_attribute)] 2016-11-03 11:24:13 +01:00
Anthony Ramine
c4f27e42b7 Remove #![feature(custom_derive)] 2016-11-03 10:14:21 +01:00
Anthony Ramine
0a48c69061 Remove use of serde custom derive plugin in net 2016-11-03 10:10:00 +01:00
Ms2ger
479cf1ef23 Stop panicking when trying to load ftp URLs. 2016-11-02 16:15:26 +01:00
Ms2ger
634a3989ad Move ResponseAction to the image cache. 2016-11-02 16:15:25 +01:00
Ms2ger
fe3d512ea4 Remove ProgressSender::Listener. 2016-11-02 16:15:23 +01:00
Ms2ger
8a6016013e Remove unused argument to start_sending_opt. 2016-11-02 16:15:22 +01:00
Ms2ger
40c711bf97 Remove LoadConsumer::Listener. 2016-11-02 16:15:21 +01:00
Ms2ger
e8d9546035 Use fetch_async in the image cache. 2016-11-02 16:15:20 +01:00
Ms2ger
b9ad395a61 Set cookies in http_network_fetch. 2016-11-02 09:25:55 +01:00
Ms2ger
2d430050a8 Only pass the headers to set_cookies_from_response.
I will need to call it from the fetch code, which does not have a
HttpResponse on hand.

Also, rename the function to match its new signature.
2016-11-02 09:20:32 +01:00
Ms2ger
f34534740a Pass the entire FetchContext to http_network_fetch. 2016-11-02 09:20:31 +01:00
Ms2ger
28d06ab40a Store the referrer in the Response and return it in Response::metadata(). 2016-11-02 09:20:30 +01:00
Ms2ger
a66f186866 Return a network error Response from http_network_fetch when obtain_response fails. 2016-11-02 09:20:29 +01:00
Ms2ger
784c45a306 Store the NetworkError in network error Responses. 2016-11-02 09:20:28 +01:00
Ms2ger
6af63d6af1 Make the status handling in http_fetch more robust. 2016-11-02 09:20:27 +01:00
bors-servo
291f393723 Auto merge of #13986 - iamrohit7:tidy-feature-attrs, r=Wafflespeanut
Make test-tidy check for alphabetical ordering of #![feature(...)] statements

<!-- 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 #13954  (github issue number if applicable).

<!-- Either: -->
- [X] 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/13986)

<!-- Reviewable:end -->
2016-11-01 01:13:35 -05:00
Rohit Burra
32ba45ab6f Fix tidy issues 2016-11-01 11:35:40 +05:30
Daan Sprenkels
66059904b7 Remove extra spaces in function calls and declarations 2016-10-31 18:11:37 +01:00
Ms2ger
6bd5d2716b Avoid some unnecessary clones when handling cookies. 2016-10-20 09:38:47 +02:00