webbeef
58f34ad7a3
Create HttpStatus to safely deal with HTTP responses status. ( #33581 )
...
Signed-off-by: webbeef <me@webbeef.org>
2024-09-29 18:23:48 +00:00
Gae24
f986160ed4
fix many clippy warnings ( #33510 )
...
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2024-09-21 13:58:31 +00:00
webbeef
f6ae050077
net: use saturating_sub when substracting durations to prevent underflows ( #33341 )
...
* net: use saturating_sub when substracting durations to prevent underflows
Signed-off-by: webbeef <me@webbeef.org>
* Add regression test. (#1 )
* Add regression test.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2024-09-08 07:36:27 +00:00
Martin Robinson
a58d816319
net: Stop using legacy time in the HTTP and CORS caches ( #33259 )
...
This is part of switching away from using a very old version of `time`.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-08-30 12:54:02 +00:00
Ashwin Naren
ea5cf75169
clippy: Fix various clippy warnings throughout the code ( #33003 )
...
* replace u64::max_value() with u64::MAX
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* removed redundant import
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* Fixed dereference
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* Fixed a probable bug
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* fixed imports
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* fixed dereference
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* dereference formatting
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* removed unnessicary number imports
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* removed unnessicary number imports
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* removed excess borrow
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* ran mach fmt
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* fixed doc comment
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* removed deref on an immutable reference
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* fixed minor syntax error
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* reverted clamping
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* formatting
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* reverted final clamp
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Ashwin Naren <ashwin@pixelators.org>
2024-08-13 05:16:47 +00:00
Peter Mikola
3c06536cb6
clippy: fix some leftover warnings in components/net ( #32476 )
2024-06-11 17:50:21 +00:00
eri
63527f56ca
clippy: Fix warnings in components/net
( #31626 )
...
* clippy: fix warnings in `components/net`
* fix: review comments
2024-03-13 09:40:04 +00:00
eri
67b277c992
clippy: fix warnings in components/net ( #31564 )
...
* clippy: fix some warnings in components/net
* fix: review comments
* fix: tidy
2024-03-10 15:34:16 +00:00
Martin Robinson
8e5f28839c
Revert "Replace time with std::time in components/net ( #31079 )" ( #31120 )
...
This reverts commit 580062228b
.
2024-01-18 15:10:48 +00:00
Taym Haddadi
580062228b
Replace time with std::time in components/net ( #31079 )
...
* Replace time with std::time in components/net
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix cookie::test_sort_order test
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-17 14:18:20 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate
( #30311 )
...
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Naveen Gattu
a48a111cee
Upgrade Hyper
2022-01-16 09:34:17 -08:00
Naveen Gattu
903e0cd857
Non-blocking network IO
2021-12-23 11:16:24 -08:00
Dominic Cooney
a68c336e55
mach fmt
after updating toolchain to 2021-05-18
...
Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>
2021-05-22 23:31:01 +09:00
Josh Matthews
f030162ec3
Make reload button clear the network cache.
2020-07-27 22:34:07 -04:00
Simon Sapin
1ff5433aef
Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22)
2019-12-23 14:07:01 +01:00
Gregory Terzian
4f3ba70704
http-cache: wait on pending stores
...
and various small improvements
2019-10-08 17:58:20 +08:00
bors-servo
37ab273c82
Auto merge of #24370 - jdm:cache-crossorigin-test, r=gterzian
...
Cache crossorigin test
This adds a test for #24356 to ensure that we don't regress our cache behaviour.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
<!-- 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/24370 )
<!-- Reviewable:end -->
2019-10-07 11:28:53 -04:00
Tugdual JULLIEN
85e6418271
Pass argument by reference to CacheKey constructor
...
Argument now passed by reference, and clone() removed when calling
constructor.
2019-10-05 11:18:51 +02:00
Josh Matthews
b347cf877c
Add some useful HTTP cache debug output.
2019-10-04 15:26:03 -04:00
Josh Matthews
2156ed7ab2
rustfmt
2019-10-03 03:12:18 -04:00
Josh Matthews
d8cdc71a28
Use unfiltered response body when replicating body of cached responses.
2019-10-03 02:21:27 -04:00
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