Commit graph

1239 commits

Author SHA1 Message Date
Josh Matthews
c8692d83ab net: Add unit test for accepting a self-signed cert. 2020-06-09 18:29:39 -04:00
Josh Matthews
2550600131 net: Use a POST request for allowing certs temporarily. 2020-06-09 16:51:21 -04:00
Josh Matthews
6a6662195e net: Add option to temporarily accept certs that failed the handshake. 2020-06-09 15:03:18 -04:00
Josh Matthews
433c154595 net: Allow SSL websockets to use dynamic list of certs as well. 2020-06-09 15:03:18 -04:00
Josh Matthews
0ce2aa917a net: Pass certs that fail the SSL handshake out of the network layer. 2020-06-09 15:03:18 -04:00
Josh Matthews
1cdaf40eb2 net: Add an SSL verification callback to support checking a dynamic list of certs. 2020-06-09 15:03:18 -04:00
Gregory Terzian
c1b76533fa partially integrate streaming request bodies with http re-direct 2020-06-04 11:38:38 +08:00
Gregory Terzian
3535dd7412 net: use an empty body for the null body case 2020-06-04 11:38:38 +08:00
Gregory Terzian
7d51997214 net: update list of bad ports 2020-06-04 11:38:38 +08:00
Gregory Terzian
ca686313ee net: don't set content-length in obtain response 2020-06-04 11:38:37 +08:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
bors-servo
5dae012db8
Auto merge of #26678 - gterzian:shutdown_net_runtime, r=Manishearth
Net: shutdown async runtime on exit

<!-- Please describe your changes on the following line: -->

Shutting down the async runtime as part of exiting the core resource thread.

---
<!-- 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. -->
2020-05-30 11:59:20 -04:00
Gregory Terzian
fa765168b9 net: shutdown async runtime on exit 2020-05-30 21:04:34 +08:00
Simon Sapin
d4227b5b0d Remove some unused dependency declarations
This is based on compiling with `RUSTFLAGS="-W unused_crate_dependencies"` (CC https://github.com/rust-lang/rust/pull/72342) in a recent Nightly (more so than used in the tree as of this writing, CC https://github.com/servo/servo/issues/26661 for work-arounds).

Only one crate is actually removed from the dependency graph, others are still dependended from other places.
2020-05-29 00:04:34 +02:00
Josh Matthews
63cdcb847d Remove duplicate Host header from initial websocket request. 2020-05-22 14:51:43 -04:00
Alexandrov Sergey
357b486455 make is_origin_trustworthy a method of ServoUrl + fix localhost handling 2020-05-19 20:06:59 +03:00
Alexandrov Sergey
a7c5c97616 check http_state in determine_request_referrer 2020-05-19 20:06:59 +03:00
bors-servo
66b81d51dc
Auto merge of #26430 - Eijebong:referrer-policy, r=jdm
Implement referrer policy

Fixes #26270
2020-05-12 17:37:53 -04:00
Josh Matthews
eb2f7f7f0a Convert all uses of UpdateResources api to use webrender transactions. 2020-05-11 17:41:56 -04:00
Bastien Orivel
bdbfde9ec0 Don't send a load event when a loaded image is actually the placeholder
The image cache returns an `ImageCacheResult::ImageAvailable `the second
time you try getting the placeholder. This means that in some cases, the
loading of an image would fail, then the same image would get fetched
from the cache, the placeholder would be loaded from that but would be
seen as a normal image, firing a load event.

This made the tests in
`fetch/cross-origin-resource-policy/image-loads.html` fail depending on
their order.
2020-05-08 19:15:24 +02:00
Bastien Orivel
8249be38c9 Implement cross origin resource policy check
I removed the window getter usage from those tests as servo does not
support that yet.
2020-05-08 19:15:24 +02:00
Bastien Orivel
ec665d9dce Properly set the url on the Response object when the response is an opaqueredirect 2020-05-06 20:08:26 +02:00
bors-servo
b290ad95c1
Auto merge of #26407 - mrobinson:animation-restyle-model, r=jdm
Have animations more closely match the HTML spec

These two commits do two major things:

**Have animations ticks trigger a restyle**: This corrects synchronization issues with animations,
where the values used in layout are out of sync with what is returned by `getComputedStyle`.

**Tick the animation timer in script according to spec**: This greatly reduces the flakiness of
animation and transitions tests.

Fixes #13865.

<!-- 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
- [ ] These changes fix #13865

<!-- 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. -->
2020-05-06 04:12:31 -04:00
Josh Matthews
4a1732a761 Remove outdated HTTP redirection handling code. 2020-05-05 21:22:51 +02:00
Bastien Orivel
2b28042446 Fix a mistake in the redirect fetch code
The spec says to ignore both HEAD and GET in step 11
2020-05-05 20:43:56 +02:00
Bastien Orivel
566147dab3 Strip request-body-header when redirecting from a POST to GET
This doesn't change any expectation because we're not setting
response.redirected properly so all the tests fail later on when it's
asserted to be true.

Fixes #25257
2020-05-05 20:43:55 +02:00
Bastien Orivel
c14ab259d0 Implement referrer policy
Fixes #26270
2020-05-05 19:43:44 +02:00
Martin Robinson
b585ce5b1f Use a restyle for animation ticks
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.

While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.

Fixes #13865.
2020-05-05 15:13:35 +02:00
atouchet
0da9ba5bbe More Cargo.toml updates 2020-04-25 18:26:49 -07:00
Josh Matthews
d4e85f9a90 Don't continually re-request completed requests that had load errors. 2020-04-17 11:59:00 -04:00
Julien Tregoat
2742fd2bea Refactor ImageCache::find_image_or_metadata API. 2020-04-17 11:58:18 -04:00
Simon Sapin
1c0549ce7f Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
Gregory Terzian
1e017a7082 allow for a service worker network mediator per origin 2020-04-05 22:43:37 +08:00
Josh Matthews
19216627d3 Update content-security-policy. 2020-03-25 09:11:09 -04:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
bors-servo
0f9b04680a
Auto merge of #25842 - servo-wpt-sync:wpt_update_25-02-2020, r=jdm
Sync WPT with upstream (25-02-2020)

Automated downstream sync of changes from upstream as of 25-02-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-02-25 19:01:26 -05:00
bors-servo
cd00e57c97
Auto merge of #25740 - gterzian:per_fetch_filemanager_handle, r=Manishearth
Per fetch file token for blob url

<!-- Please describe your changes on the following line: -->

Depends on https://github.com/servo/servo/pull/25724

First step of https://github.com/servo/servo/issues/25226

---
<!-- 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. -->
2020-02-25 14:49:26 -05:00
Josh Matthews
ba83f0ffa6 Don't panic when dealing with disconnected websockets. 2020-02-25 13:53:15 -05:00
Gregory Terzian
895500e68c add a fetch token for blob urls 2020-02-21 14:26:45 +08:00
Josh Matthews
3fd3c23e17 Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
bors-servo
795dab71ff
Auto merge of #25768 - pshaughn:corsstar, r=jdm
Handle access-control header wildcards

<!-- Please describe your changes on the following line: -->
We were checking Access-Control-Expose-Headers for wildcards inconsistently and then discarding the result; this fixes the check and its use, passing the WPT test for having a wildcard there.

---
<!-- 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 #24913

<!-- 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. -->
2020-02-14 23:16:37 -05:00
bors-servo
4c5ec9da27
Auto merge of #25724 - gterzian:use_rayon_for_file_threads, r=Manishearth
Use rayon for file operations off the main resource thread

FIX #25723

---
<!-- 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. -->
2020-02-14 21:24:35 -05:00
bors-servo
55473eb441
Auto merge of #25739 - servo:rustup, r=paulrouget
Upgrade to rustc 1.43.0-nightly (5d04ce67f 2020-02-13)

~This Nightly doesn’t have rustfmt, so merging this PR is blocked on https://github.com/rust-lang/rust/issues/68917 and upgrading to a Nightly with the fix.~

Fixes #25550
2020-02-14 15:14:18 -05:00
Patrick Shaughnessy
739f09e199 Handle access-control header wildcards 2020-02-14 13:13:22 -05:00
bors-servo
cdd5dc17aa
Auto merge of #25736 - Darkspirit:ossl, r=jdm
Add OpenSSL 1.1.1 build check, Update HSTS Preload list

* This variant also works with cross-compilation. PR should fail in CI on Android at first:
  The net crate successfully compiled after switching to OpenSSL 1.1.1 on Android. It seemed openssl.sh doesn't need any changes.(?)
* Updated HSTS preload list and public suffix list.
* Configured OpenSSL [SECLEVEL=2](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html) like [Debian](https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1) Stable:
  > As a result RSA, DSA and DH keys shorter than [2048 bits](16a5a9bb78/docs/BR.md (6153-subscriber-certificates)) and ECC keys shorter than 224 bits are prohibited.
* Although all other crates compile I generally get a `libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8` error on simpleservo_jniapi, I guess Debian Testing is too new and I just haven't found the right steps so far.
./mach build -d --android
```
  = note: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/deps/libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          toolchain: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin
          libs dir: /home/darkspirit/github/servo/android-toolchains/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a
          sysroot: /home/darkspirit/github/servo/android-toolchains/ndk/platforms/android-21/arch-arm
          targetdir: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/build/simpleservo_jniapi-26ef18debb5b3630/out/../../..
```

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25708, fix #25619.
2020-02-14 12:57:22 -05:00
Gregory Terzian
780a1bd6cb add a core resource thread-pool 2020-02-14 10:54:31 +08:00
Simon Sapin
db4f27f361 Use the matches! macro from the standard library 2020-02-12 10:08:31 +01:00
Jan Andre Ikenmeyer
21112a1b84
Configure OpenSSL SECLEVEL=2 2020-02-12 01:40:07 +01:00
Jan Andre Ikenmeyer
21b2479dc2
Add build check for OpenSSL 1.1.1 requirement 2020-02-12 01:39:57 +01:00
Patrick Shaughnessy
41d896c201 file: and about: are now opaque-filtered responses 2020-02-11 10:19:43 -05:00