diff options
author | BlackDex <[email protected]> | 2023-08-04 16:50:38 +0200 |
---|---|---|
committer | BlackDex <[email protected]> | 2023-08-13 19:13:00 +0200 |
commit | 6cdcb3b2976be758987a36491d2da4ecccad941f (patch) | |
tree | 10ed1fc1bda43a5ec42d17e3501165e409e49de4 /Cargo.toml | |
parent | d1af468700021f6856f1fa6b991a84ed92727554 (diff) | |
download | vaultwarden-6cdcb3b2976be758987a36491d2da4ecccad941f.tar.gz vaultwarden-6cdcb3b2976be758987a36491d2da4ecccad941f.zip |
Optimized Favicon downloading
Some optimizations in regards to downloading Favicon's.
I also encounterd some issues with accessing some sites where the
connection got dropped or closed early. This seems a reqwest/hyper
thingy, https://github.com/hyperium/hyper/issues/2136. This is now also
fixed.
General:
- Decreased struct size
- Decreased memory allocations
- Optimized tokenizer a bit more to only emit tags when all attributes are there and are valid.
reqwest/hyper connection issue:
The following changes helped solve the connection issues to some sites.
The endresult is that some icons are now able to be downloaded always instead of sometimes.
- Enabled some extra reqwest features, `deflate` and `native-tls-alpn`
(Which do not bring in any extra crates since other crates already enabled them, but they were not active for Vaultwarden it self)
- Configured reqwest to have a max amount of idle pool connections per host
- Configured reqwest to timeout the idle connections in 10 seconds
Diffstat (limited to 'Cargo.toml')
-rw-r--r-- | Cargo.toml | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -124,7 +124,7 @@ email_address = "0.2.4" handlebars = { version = "4.3.7", features = ["dir_source"] } # HTTP client (Used for favicons, version check, DUO and HIBP API) -reqwest = { version = "0.11.18", features = ["stream", "json", "gzip", "brotli", "socks", "cookies", "trust-dns"] } +reqwest = { version = "0.11.18", features = ["stream", "json", "deflate", "gzip", "brotli", "socks", "cookies", "trust-dns", "native-tls-alpn"] } # Favicon extraction libraries html5gum = "0.5.7" |