Commit graph

29 commits

Author SHA1 Message Date
bors-servo
5592682c4b
Auto merge of #23494 - gterzian:improve_http_cache, r=jdm
Various improvements and update to the http cache

<!-- 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: -->
- [ ] `./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 ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/23494)
<!-- Reviewable:end -->
2019-06-22 11:36:14 -04:00
Gregory Terzian
67494d4776 http-cache: do not cache responses from requests with authorization 2019-06-20 06:18:25 -07:00
Gregory Terzian
4f41065dfb http-cache: improve handling of network errors and partial content 2019-06-17 13:19:46 +08:00
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
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
Gregory Terzian
5836bd2fc0 fix potentially overflowing arithmetic in cache range requests 2019-03-15 13:38:37 +08:00
Shotaro Yamada
c44a2febe6 Remove redundant .clone()s 2018-12-11 10:43:51 +09: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
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +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
2481ad25f8 Rustfmt net crate 2018-11-03 15:29:01 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Gregory Terzian
96c124230b Ensure done_chan is Some, when refreshing a still receiving resource 2018-06-23 16:49:50 +08:00
Dale Wijnand
55e254fd27
Make a doc URL a clickable link 2018-06-07 14:42:07 +01: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
CYBAI
0dda473146 Use specific assertion for net http_cache 2018-01-26 01:01:02 +08:00
Gregory Terzian
993e2f55ed handle caching of response with a body of ResponseBody::Receiving 2018-01-13 10:48:36 +08:00
Gregory Terzian
609e975c50 ignore aborted response in http caching 2018-01-13 10:48:35 +08:00
Emilio Cobos Álvarez
820c9a1828
net: Use ? on Option more often. 2017-12-09 20:46:20 +01:00
Hugh Gallagher
1b4b1c2bb2 Removed unused import in net/http_cache.rs 2017-11-21 14:09:25 +00:00
Gregory Terzian
6196a6e65d add pref to disable http cache, mozilla tests 2017-11-19 13:52:13 +08:00
Gregory Terzian
5f8a310bd1 also cache redirects 2017-11-17 21:36:30 +08:00
Gregory Terzian
2799b4eac9 more http cache work 2017-11-16 13:36:12 +08:00
Josh Matthews
f674cba612 Beginnings of a http cache
Doom cache entries based on the initial response, and prevent matching against doomed cache enties.

Evict cache entries that have passed their expiry date instead of matching them.

Document the cache. Refactor incomplete entries to lessen Option-itis.

Revalidate expired cache entries instead of unconditionally evicting them.

Forbid missing docs in cache code.

Revalidate must-revalidate entries.

Fetch content tests from a local HTTP server.

Track requests made to the test HTTP server.

Add a simple test that a cached resource with no expiry is not revalidated. Correct inverted expiry check in revalidation code.

Fix incorrect revalidation logic that dropped the consumer channels on the floor.

Ensure that requests are cached based on their request headers.

Run a separate http server instance for each test to avoid intermittent failures due to concurrent cache tests.

Add a test for uncacheable responses.

Address review comments.
2017-11-14 17:20:39 +08:00