Commit graph

219 commits

Author SHA1 Message Date
Patrick Shaughnessy
67827debd8 Now just one is_cors_safelisted_request_header, with closer spec alignment 2019-12-16 09:07:02 -05:00
bors-servo
bf587f22d7
Auto merge of #24508 - pajamapants3000:21254, r=jdm
Add start_time to resource timing.

<!-- Please describe your changes on the following line: -->
`start_time` property added to `ResourceFetchTiming`, which enables the setting of `start_time` in the `PerformanceEntry` member of `PerformanceResourceTiming`.

Following the specification at https://w3c.github.io/resource-timing/#dfn-starttime, `start_time` is set to the value of `redirect_start` if redirection occurs and the timing allow check passes. Otherwise it has the same value as `fetch_start`.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21254

<!-- Either: -->
- [x] 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. -->
2019-10-22 09:34:07 -04:00
Tommy Lincoln
fcad88cddd Add start_time to resource timing. 2019-10-20 07:28:11 -07:00
Michael Howell
b8f3e8bb2e Add simple implementation of content-security-policy on scripts / styles
This needs a lot more hooks before it'll actually be a good
implementation, but for a start it can help get some feedback on if this
is the right way to go about it.

Part of servo/servo#4577
2019-10-16 19:46:45 +00:00
Gregory Terzian
4f3ba70704 http-cache: wait on pending stores
and various small improvements
2019-10-08 17:58:20 +08:00
Javed Nissar
7596c36959 Move ResourceFetchTiming into Arc
The purpose of this commit is to ensure that the Response object has
access to Timing updates as previously the Response object simply
stored a ResourceFetchTiming struct so updates on ResourceFetchTiming
that were not explicitly done on the Response would not be passed down.
The references to ServoArc are added because Response uses
servo_arc::Arc rather than std::sync::Arc as is used elsewhere. So,
we've switched those other places to servo_arc::Arc instead of switching
Response to std::sync::Arc.
2019-09-18 11:54:28 -04:00
Simon Sapin
8eb650bafd Deduplicate idna, log, mime, mime_guess, percent-encoding, unicase, url, ws 2019-08-19 20:09:20 +02:00
bors-servo
1d2c0ba0bc
Auto merge of #23593 - georgeroman:fix_panic_on_opening_directory, r=Manishearth
Fix panic on opening a directory

<!-- 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: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Continued from https://github.com/servo/servo/pull/23548

<!-- 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/23593)
<!-- Reviewable:end -->
2019-06-22 22:24:08 -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
George Roman
29bdcba1e8 Fix panic on opening a directory 2019-06-18 17:01:51 +03: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
Adit Jain
77c9285780 Added fetch_start functionality in http_fetch
Added spec link for webidl.
Added fetch_start functionality to PRT .
Changed the fetch_start location
2019-01-24 23:18:54 +05:30
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Shotaro Yamada
c44a2febe6 Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
Josh Matthews
0d9ab894be net: Wait for underlying response body of filtered responses. 2018-11-30 19:03:47 -05:00
George Roman
73f11d69ea Change Response's statusText default value from 'Ok' to an empty string 2018-11-27 19:26:40 +02:00
Fernando Jiménez Moreno
b23dd0587b Add comment about incorrect tests for file url range requests. Fmt and manifest update 2018-11-26 15:28:27 +01:00
Fernando Jiménez Moreno
4561a97309 Use crossbeam channel instead of servo channel. Fix rebase issues and add comment 2018-11-26 09:34:14 +01:00
Fernando Jiménez Moreno
79d27cb7ca Set response status for range requests to file and blob urls 2018-11-26 09:34:14 +01:00
Fernando Jiménez Moreno
b96e5681aa Do not set Receiving body to Done when it's not needed 2018-11-26 09:34:14 +01:00
Fernando Jiménez Moreno
526f6fcadd Allow range requests to blob URLs with negative offsets 2018-11-26 09:34:14 +01:00
Fernando Jiménez Moreno
a84442864d Add support fo byte range requests for blob URLs 2018-11-26 09:33:35 +01:00
Fernando Jiménez Moreno
8538634210 Finish asynchronous blob url fetching 2018-11-26 09:33:34 +01:00
ms2300
2f3affcfc8 Blob url's changes now build and test 2018-11-26 09:33:34 +01:00
ms2300
e84e1d607b Initial implementation of asynchronous blob url fetching 2018-11-26 09:33:34 +01: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
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
f512e262a5 Reduce right drift in scheme_fetch 2018-11-03 16:15:48 +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
Fernando Jiménez Moreno
0f73544297 Support for byte range requests on file urls 2018-10-31 12:50:58 +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
Jackson Lewis
430ba86668 Tidy things up 2018-09-06 16:09:35 -07:00
Jackson Lewis
04288748ee Make file fetch asynchronous 2018-09-04 14:50:33 -07:00
Jackson Lewis
f04c965a9b Read file in chunks and send chunks to FetchTaskTarget instead of read_to_end call 2018-08-28 10:15:50 -07:00
CYBAI
7f5a1538d3 Use specific assertion for net fetch methods 2018-01-26 01:30:31 +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
Manish Goregaokar
6f59b152f1 Add aborted flag to response, set when fetch is aborted 2017-11-20 17:04:55 -08:00
Manish Goregaokar
6dd7af2bda Fetch cancellation: Add CancellationListener 2017-11-20 16:54:24 -08:00
Manish Goregaokar
1dfb125cc9 Fetch cancellation: Add cancel_chan to FetchContext 2017-11-17 15:59:59 -08:00