Commit graph

55 commits

Author SHA1 Message Date
Josh Matthews
b1510d9ad5 Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
est31
fe58aca75d Remove unused code from net and net_traits crates 2019-06-02 02:44:37 +02:00
George Roman
73f11d69ea Change Response's statusText default value from 'Ok' to an empty string 2018-11-27 19:26:40 +02:00
ddh
26007fddd3 refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata

implemented deprecated window.timing functionality

created ResourceTimingListener trait

fixed w3c links in navigation timing

updated include.ini to run resource timing tests on ci
2018-11-20 16:21:32 +00:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
d41be1d56d Rustfmt net_traits crate 2018-11-03 16:18:44 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Michael Howell
3b1bfa3942 Thread the status through navigation redirects
This is necessary because status codes affect whether the redirect is
done with the same HTTP method or a different one.

This is part of #21886, but there's also a flaw in how iframes are handled
that is causing the redirect to take over the entire window, so this
commit doesn't entirely fix slither.io.
2018-10-13 00:14:56 +00:00
modal-d17
af445a357d Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.

Added a Measurable struct that acts as a container for fields size_of() can be called for.

Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.

Updated test file.
2018-04-01 13:30:57 -04:00
Gregory Terzian
609e975c50 ignore aborted response in http caching 2018-01-13 10:48:35 +08:00
Manish Goregaokar
6f59b152f1 Add aborted flag to response, set when fetch is aborted 2017-11-20 17:04:55 -08:00
Simon Sapin
793bebfc0e Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08) 2017-11-09 16:56:39 +01:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Keith Yeung
5b69d18fca Add location_url to Metadata struct 2017-08-18 16:30:14 -07:00
Keith Yeung
0ff47c4475 Update HTTP fetch 2017-08-08 09:27:19 -07:00
Keith Yeung
ed9c16575c Update main fetch 2017-08-08 09:22:29 -07:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Anthony Ramine
7b16021a89 Make Response::url_list be a bare Vec<ServoUrl> 2017-04-03 12:47:28 +02:00
Anthony Ramine
80e02303d3 Make Response::internal_response a bare boolean 2017-04-03 12:39:11 +02:00
bd339
0f1eb13e33 Don't lose information in Fetch API
Also update test expectations.
2017-01-09 14:52:14 +01:00
Ms2ger
b46846e2a0 Rustfmt net_traits. 2017-01-03 15:06:41 +01:00
Ms2ger
b76613a389 Skip rustfmt on to_filtered.
https://github.com/rust-lang-nursery/rustfmt/issues/1262
2017-01-03 15:06:37 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +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
Ms2ger
45153f61b6 Implement Debug for Response. 2016-11-08 18:00:24 +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
784c45a306 Store the NetworkError in network error Responses. 2016-11-02 09:20:28 +01:00
Keith Yeung
07c9cfecec Add FetchMetadata and update corresponding methods 2016-09-21 14:26:03 -07:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Malisa Smith
faf32a7cfb dom::Response implementation 2016-09-06 19:58:32 -07:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02: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
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
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Keith Yeung
e42481d0e7 Implement CORS preflight fetch 2016-04-13 11:28:14 -04:00
bors-servo
95883dcbcf Auto merge of #9907 - nikkisquared:async_tests, r=jdm
Add Tests For Asynchronous Fetch Calls With Filtered Responses

I've added two tests using async_fetch intended to create filtered responses. I caught and fixed a bug where waiting for response.body to be completed would never pass for Opaque or OpaqueRedirect, since their response.body is always `Empty`.

As always, I'd appreciate review and feedback! I don't plan to write new tests, but I will gladly patch up any gaps in the current tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9907)
<!-- Reviewable:end -->
2016-03-10 08:59:07 +05:30
Nikki
cddc03be33 added two fetch_async tests involving filtered responses 2016-03-09 18:16:17 -07: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
Nikki
b187985e49 set response.body asynchronously in Fetch 2016-03-07 15:09:39 -07:00
Nikki
3f79667050 implementing working demonstration of calling Fetch asynchronously 2016-03-01 13:02:38 -07:00
bors-servo
f1018b84a8 Auto merge of #9525 - nikkisquared:test_filtered_responses, r=asajeffrey
Test filtered responses and implement Cors Check Fetch step

I've been writing tests for creating filtered responses. So far I have three of the four types being made (namely, Basic, CORS, and Opaque), and just need to figure out how to make an OpaqueRedirect filtered response, since it's handled separately from the others. I will also add more tests to ensure the content of the filtered responses matches the limitations placed by the specification.

Along the way I implemented Cors Check, since it's required for the CORS filtered response. @jdm suggested I handle it in here, since it's such a small step, compared to other parts of Fetch.

Since all the tests currently pass, and I've spent a while adding the Cors Check and other pieces, I figured now would be a good time to start having it reviewed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9525)
<!-- Reviewable:end -->
2016-02-10 03:11:22 +05:30