Merge pull request #69 from greatest-ape/2022-04-10

http load test & http protocol fixes
This commit is contained in:
Joakim Frostegård 2022-04-11 14:31:55 +02:00 committed by GitHub
commit 7c3d5fc452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -26,7 +26,7 @@ log = "0.4"
mimalloc = { version = "0.1", default-features = false }
rand = { version = "0.8", features = ["small_rng"] }
rand_distr = "0.4"
rustls = { version = "0.20", features = ["dangerous_configuration"] }
rustls = { version = "0.20", default-features = false, features = ["logging", "dangerous_configuration"] } # TLS 1.2 disabled
serde = { version = "1", features = ["derive"] }
[dev-dependencies]

View file

@ -233,7 +233,7 @@ impl Connection {
break;
}
Err(err) => {
eprintln!(
::log::warn!(
"deserialize response error with {} bytes read: {:?}, text: {}",
buffer_position,
err,

View file

@ -59,6 +59,9 @@ impl AnnounceRequest {
output.write_all(::urlencoding::encode(key.as_str()).as_bytes())?;
}
// Always ask for compact responses to ease load testing of non-aquatic trackers
output.write_all(b"&compact=1")?;
output.write_all(b" HTTP/1.1\r\nHost: localhost\r\n\r\n")?;
Ok(())