Commit graph

340 commits

Author SHA1 Message Date
Rebecca
687d0cd7c3 Add meta-referrer support for documents 2016-06-02 21:48:09 -04:00
Anthony Ramine
a09773e819 Handle origin when blocking content 2016-05-30 13:17:43 +02:00
Josh Matthews
074fc4a5e1 Process content blocker rules in the HTTP loader. 2016-05-30 13:17:42 +02:00
Josh Matthews
50fea8554e Read the content blocking rules and make them available to the HTTP loader. 2016-05-30 10:54:52 +02:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Josh Matthews
9e8cf19e51 Add timeline markers for HTTP requests, JS evaluation, and HTML parsing. 2016-05-18 08:02:42 -05:00
Matt Brubeck
c344461017 Move http_loader::Connector to a separate module 2016-05-10 11:20:32 -07:00
Josh Matthews
cb63ad6c87 Add the requesting URL to the 401 prompt. Only show the 401 prompt when the WWW-Authenticate header is present. 2016-05-03 13:19:42 -04:00
bors-servo
88020e9151 Auto merge of #10869 - frewsxcv:dry, r=jdm
DRY out `StreamedResponse::from_http_response`.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10869)
<!-- Reviewable:end -->
2016-04-27 04:23:34 -07:00
Corey Farwell
87b54ef685 DRY out StreamedResponse::from_http_response. 2016-04-27 01:00:50 -04:00
Corey Farwell
55c2f93740 Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
bors-servo
81f6e70a62 Auto merge of #10785 - frewsxcv:loaderrortype-nostring, r=jdm
Refactor `LoadErrorType` to not require a `String` for every type.

Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10785)
<!-- Reviewable:end -->
2016-04-25 14:37:44 -07:00
Corey Farwell
2675d9d1ff Refactor LoadErrorType to not require a String for every type.
Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.
2016-04-25 17:10:33 -04:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Daniel
d4f63cda5f write cookie_jar, hsts_list, auth_cache, and local_data to file if profile_dir option is present 2016-04-20 18:12:00 -04:00
Ravi Shankar
945a2c66e1 Updated the unit tests to include NetworkError 2016-04-20 12:38:36 -04:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Corey Farwell
7500307e80 Avoid unnecessary net_traits::LoadData clone. 2016-04-18 22:53:28 -04:00
Corey Farwell
da0adeb0ac Verify number of redirects when we reach limit. 2016-04-17 20:14:08 -04:00
Corey Farwell
8e14cbccc3 Add pref for HTTP redirection limit.
The pref key name matches the associated Gecko pref key name.
2016-04-17 16:43:55 -04:00
Corey Farwell
08fc002f41 Rename 'HSTS*' structures to 'Hsts*'.
"In CamelCase, acronyms count as one word: use Uuid rather than UUID."

-- https://doc.rust-lang.org/style/style/naming/README.html
2016-04-17 14:12:28 -04:00
bors-servo
cc290c6e8a Auto merge of #10650 - jdm:disabletfd, r=KiChjang
Disable tinyfiledialogs on non-OS X and Linux platforms.

I haven't been able to fix the appveyor build yet, so this gives us back a usable Windows build.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10650)
<!-- Reviewable:end -->
2016-04-17 02:50:19 +05:30
Josh Matthews
d09a497aa5 Disable tinyfiledialogs on non-OS X and Linux platforms. 2016-04-16 15:00:31 -04:00
Corey Farwell
12dfe6ff28 Flatten implementation of net::http_response::HttpResponse. 2016-04-15 09:13:47 -04:00
Josh Matthews
43369fa897 Rename create_with_headers to create. 2016-04-15 01:46:04 -04:00
Josh Matthews
a761f2bed4 Remove unused header manipulation facilities. 2016-04-15 01:46:03 -04:00
Josh Matthews
a315f8db9e Reorganize header manipulation that occurs before sending an HTTP request so we can provide the full set of headers while creating a request. 2016-04-15 01:45:56 -04:00
Josh Matthews
0e1703d747 Convert NetworkHttpRequestFactory. 2016-04-15 01:45:55 -04:00
Josh Matthews
80eaeac9f4 Make headers available when creating an HTTP request via a factory. 2016-04-15 01:45:48 -04:00
Josh Matthews
dc790048ec Remove unnecessary type annotations. 2016-04-15 01:00:44 -04:00
Daniel
b0e1f10ba5 401 authorization UI then restart request/save successful auth creds 2016-04-14 21:38:45 -04:00
Ms2ger
489d2e5e49 Update uuid. 2016-04-07 09:00:22 +02:00
Connor Brewster
b09570b2b6 Added global state struct
Replace hsts_list, auth_cache, and cookie_jar with http_state

Reverted a few changes

Moved http_state back to factory
Removed unnecessary Arc

Removed Arc for http_state
2016-03-25 12:35:40 -06:00
Daniel
d49d3b01f2 add auth cache to resources + set auth header if url does not have creds 2016-03-24 12:24:08 -04:00
bors-servo
162e89d8c6 Auto merge of #9780 - bobthekingofegypt:github_hsts_bug, r=jdm
correctly send secure cookies after hsts url match

Fixes #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9780)
<!-- Reviewable:end -->
2016-03-09 15:13:52 +05:30
Nikki
b187985e49 set response.body asynchronously in Fetch 2016-03-07 15:09:39 -07:00
Bob
17e6007685 send correct url to devtool on request
Send url that was not modified by the hosts file to the dev tools
2016-03-03 17:15:29 +00:00
Bob
06ffdd68e8 refactor http_loader hostname/htst order
Changed hostname rewrite to happen inside obtain response after any htst
changes.  Removed  url from load leaving just doc_url to avoid confusion
2016-03-01 18:10:58 +00:00
Chandler Abraham
3a949b77b2 don't unconditionally override header 2016-02-27 10:47:13 -05:00
Bob
759099c78d correctly send secure cookies after hsts url match
Fix for #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.
2016-02-27 15:16:53 +00:00
bors-servo
bc034845b7 Auto merge of #9662 - rebstar6:websocket_cookies, r=jdm
Add support for websocket cookies

Addresses both cookies in request and response. Resolves #9540.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9662)
<!-- Reviewable:end -->
2016-02-18 02:44:01 +05:30
Rebecca
cf6fd6dafe Add support for websocket request and response cookies
Also change expected behavior to pass for all in tests/wpt/web-platform-tests/websockets/cookies
2016-02-17 14:50:52 -05:00
Daniel Robertson
4d15b02dde Handle credentials in modify_request_headers
Handle credentials and set the apropriate header in
`modify_request_headers`.
2016-02-15 06:47:47 +00:00
Paul Rouget
63519c3574 mozbrowsersercuritychange event 2016-02-09 08:05:17 +01:00
Nikki
5a8c533755 Implement a basic test for Fetch and fix errors it finds 2016-01-13 16:45:57 -07:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09: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