Commit graph

89 commits

Author SHA1 Message Date
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
ddh
db808ca75d Added devtools support to fetch for XHR + Manish's XHR ident fix
added unit test for request fetch with devtools

added devtools/fetch test
2016-07-29 11:20:38 +01:00
Aravind Gollakota
bfda32ea00 msg: Rename ReferrerPolicy::NoRefWhenDowngrade NoReferrerWhenDowngrade
This is more consistent with the other variants.
2016-07-15 08:13:57 -07:00
Manish Goregaokar
9deecd793c
Review fixes 2016-06-11 11:49:40 +05:30
Manish Goregaokar
fd6f9bd411 Test fixes; update for changes in spec 2016-06-10 20:55:25 +05:30
Manish Goregaokar
f4e3e8e38e Re-support gzip 2016-06-10 20:53:47 +05:30
Manish Goregaokar
909b99f1a6 Modify request headers for fetch 2016-06-10 20:53:43 +05:30
Manish Goregaokar
bf99e73cb0 Re-add support for fetching chunks (and thus xhr download progress) 2016-06-10 20:53:40 +05:30
Manish Goregaokar
6e29b872d7 Test fixes:
- Hack to stop hitting unreachable on referer
 - add fetch_done to make sync work
 - Make datauris work by setting the response URI, spec bug
 - Allow for empty bodies
 - Make request bodies work (pass to http, fix fencepost in iter count)
2016-06-10 20:53:36 +05:30
Manish Goregaokar
2cbc8dee25 Net side of XHR fetch integration 2016-06-10 20:53:15 +05:30
Manish Goregaokar
b5255f011e Revamp Fetch async handling to use a fetch target and done channels 2016-06-10 20:53:10 +05:30
Josh Matthews
7bf2e19437 Make the net monitor panel in FF's devtools show meaningful output.
0) Advertise support for the network monitor in the initial protocol communication.
1) Only notify the developer tools server about the final request in an HTTP transaction.
2) Add timing information for connecting to the HTTP server and sending the HTTP request.
3) Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
4) Calculate various header size fields correctly.
5) Remove unnecessary usize->u32 casts by making the appropriate fields usize.
6) Add header values to request and response header messages.
7) Support triggering page reloads via the devtools client.
2016-06-06 00:51:36 +01:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Keith Yeung
7a72981d87 Use read_block in http_network_fetch 2016-05-11 09:34:43 -04:00
Matt Brubeck
c344461017 Move http_loader::Connector to a separate module 2016-05-10 11:20:32 -07:00
Joshua Holmer
8bb740e95e Remove CacheRequestDetails
Fixes #10904
2016-05-02 22:08:16 -04:00
Ramana Venkata
7c14de6d4b Implement fetching file URL's 2016-04-29 16:06:07 +05:30
Daniel Robertson
483f07c8f0
Cleanup CORSCache
Remove the CORSCache trait, CORSCacheSender, CORSCacheThreadMsg, and
CORSCacheThread. Rename BasicCORSCache to CORSCache and keep its old
implementation of CORSCache.
2016-04-27 17:02:54 -04:00
Daniel Robertson
153059c55c
Fix logic for cors cache match
The current logic for a cors cache match does not consider "credentials
is false and request's credentials mode is not "include" or credentials
is true."
2016-04-27 16:39:57 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bors-servo
d21ff2fa13 Auto merge of #10189 - KiChjang:cors-preflight-fetch, r=jdm
Implement CORS preflight fetch

Fixes #10145.

<!-- 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/10189)
<!-- Reviewable:end -->
2016-04-13 21:28:25 +05:30
Keith Yeung
e42481d0e7 Implement CORS preflight fetch 2016-04-13 11:28:14 -04:00
Nazım Can Altınova
d22d1c4fc1 Removed unused imports from methods.rs 2016-04-09 22:09:11 +03:00
Keith Yeung
32f309c02e Use mime! macro in fetch methods 2016-04-08 11:26:48 -04:00
bors-servo
9f892edd87 Auto merge of #10272 - creativcoder:implement-data-url-fetch, r=jdm
implements data-url fetching

Fixes #10165
jdm mentioned of decoupling the, payload loading mechanism to data_loader.rs. So accordingly a `decoder` method has been added to data_loader.

<!-- 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/10272)
<!-- Reviewable:end -->
2016-04-01 15:12:30 +05:30
Rahul Sharma
3e74164e5f implements data-url fetching 2016-04-01 09:49:08 +05:30
faineance
7c45a4fea0 change changes effecting verbosity 2016-03-27 13:54:41 +01:00
faineance
418842faf9 use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
Stjepan Glavina
4965c93d16 Merge branch 'master' into fix-local-urls-only-10147 2016-03-24 13:45:25 +01:00
Stjepan Glavina
3ec4515a73 Address PR comments
- Remove fn `url_is_local`
- Remove fn `set_local_urls_only`
- Fix `test_fetch_with_local_urls_only`
2016-03-24 13:42:40 +01:00
Stjepan Glavina
bcd813d961 Fix fetching about:blank
When fetching about:blank, response body should be the empty byte
sequence.
Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch

Before this change, response body would be set to `ResponseBody::Empty`,
and then fetching would result in an infinite loop at step 19 in fn
`main_fetch` (methods.rs).
2016-03-24 11:17:12 +01:00
Stjepan Glavina
6576fde29b Correctly handle flag local_urls_only
In function Request::fetch_main, flag local_urls_only (if set)
should allow fetching local urls only. Before this change, the flag had
the inverse behaviour.
2016-03-23 18:01:43 +01:00
Ms2ger
91d63d5fcf Use a match rather than unwrap() in main_fetch. 2016-03-10 14:07:41 +01:00
Ms2ger
3e3053653e Fix warnings in the fetch code. 2016-03-09 16:12:15 +01:00
Ms2ger
8b629652ac Make Response::new() an inherent method.
There is no real reason to put this in an extension trait.
2016-03-08 17:55:18 +01:00
bors-servo
fee7cb179e Auto merge of #9850 - nikkisquared:2_async_2_furious, r=jdm
Set response.body Asynchronously In Fetch

Following having finished making Fetch asynchronous, response.body should be set asynchronously, since it's the major goal of calling Fetch. So far, I've made the body wrapped in Arc<Mutex<>>, and I've wrapped a new thread around the part where it's set. I've also discovered that the fetch_async function makes step 8 of Main Fetch obsolete, and I've commented it appropriately.

I'm currently having a hard time with the thread for setting response.body, though. @jdm suggested I have the body set continually, block by block, but my implementation for that runs so slow that I can't finish running my fetch test suite in reasonable time. @KiChjang pointed out that a lot of the lag is due to how response.body currently stores everything inside a Vec. Changing the storage container seems to be both necessary and beyond the scope of the time I have to work on this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9850)
<!-- Reviewable:end -->
2016-03-08 04:45:25 +05:30
Nikki
b187985e49 set response.body asynchronously in Fetch 2016-03-07 15:09:39 -07:00
Anthony Ramine
7c1dd54895 Update to Rust 2016-03-05 2016-03-06 10:36:49 +01:00
Nikki
3f79667050 implementing working demonstration of calling Fetch asynchronously 2016-03-01 13:02:38 -07:00
Keith Yeung
96971244ac Update fetch attributes to match the new spec 2016-02-27 08:40:09 -05:00
Nikki
cf607606e0 implement http redirect fetch, and various Fetch Standard updates 2016-02-17 12:52:24 -07:00
Nikki
e8665d47ea working on implementing Cors Check and Origin to Ascii serialisation 2016-02-09 13:51:35 -07:00
Nikki
db8cc6eccf Partial implementation of Main Fetch step, including appropiate updates to tests 2016-01-29 12:40:54 -07:00
Nikki
5426df32de tests for boundary conditions on redirect_count in fetch 2016-01-20 13:03:08 -07:00
Nikki
4165786767 Test setting response.body by fetching on a server 2016-01-18 15:12:31 -07:00
Keith Yeung
a53661f6c8 Rename net/fetch/request.rs to net/fetch/methods.rs and move Request to net_traits 2016-01-18 00:57:19 -05: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
c5982872c8 rewrapped Rc<RefCell<Response>> into Rc<Response> 2016-01-08 12:17:13 -07:00
Nikki
67f4df5d3a changed Rc<RefCell<Request>> into Rc<Request> 2016-01-07 12:16:01 -07:00