This breaks a reference cycle between PoolReturner and Agent that was causing Agents (and their contained ConnectionPool) to never be dropped so long as there was any stream in the ConnectionPool. This cause sockets to leak over time, particularly when the convenience functions ureq::get(), ureq::post(), etc were used, since those functions create a new Agent each time.
60 lines
2.0 KiB
TOML
60 lines
2.0 KiB
TOML
[package]
|
|
name = "ureq"
|
|
version = "2.6.2"
|
|
authors = ["Martin Algesten <martin@algesten.se>", "Jacob Hoffman-Andrews <ureq@hoffman-andrews.com>"]
|
|
description = "Simple, safe HTTP client"
|
|
license = "MIT/Apache-2.0"
|
|
repository = "https://github.com/algesten/ureq"
|
|
readme = "README.md"
|
|
keywords = ["web", "request", "https", "http", "client"]
|
|
categories = ["web-programming::http-client"]
|
|
edition = "2018"
|
|
|
|
[package.metadata.docs.rs]
|
|
# Keep in sync with .github/workflows/test.yml
|
|
features = ["tls", "native-tls", "json", "charset", "cookies", "socks-proxy"]
|
|
|
|
[features]
|
|
default = ["tls", "gzip"]
|
|
tls = ["webpki", "webpki-roots", "rustls"]
|
|
native-certs = ["rustls-native-certs"]
|
|
json = ["serde", "serde_json"]
|
|
charset = ["encoding_rs"]
|
|
cookies = ["cookie", "cookie_store"]
|
|
socks-proxy = ["socks"]
|
|
gzip = ["flate2"]
|
|
brotli = ["brotli-decompressor"]
|
|
|
|
[dependencies]
|
|
base64 = "0.13"
|
|
cookie = { version = "0.16", default-features = false, optional = true}
|
|
once_cell = "1"
|
|
url = "2"
|
|
socks = { version = "0.3", optional = true }
|
|
serde = { version = "1", optional = true }
|
|
serde_json = { version = "1", optional = true }
|
|
encoding_rs = { version = "0.8", optional = true }
|
|
cookie_store = { version = "0.19", optional = true, default-features = false, features = ["preserve_order"] }
|
|
log = "0.4"
|
|
webpki = { version = "0.22", optional = true }
|
|
webpki-roots = { version = "0.22", optional = true }
|
|
rustls = { version = "0.20.1", optional = true }
|
|
rustls-native-certs = { version = "0.6", optional = true }
|
|
native-tls = { version = "0.2", optional = true }
|
|
flate2 = { version = "1.0.22", optional = true }
|
|
brotli-decompressor = { version = "2.3.2", optional = true }
|
|
|
|
[dev-dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
env_logger = "0.10"
|
|
rustls = { version = "0.20", features = ["dangerous_configuration"] }
|
|
rustls-pemfile = { version = "1.0" }
|
|
|
|
[[example]]
|
|
name = "cureq"
|
|
required-features = ["charset", "cookies", "socks-proxy", "native-tls"]
|
|
|
|
[[example]]
|
|
name = "tls_config"
|
|
required-features = ["tls", "native-tls"]
|