mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Merge pull request #69 from greatest-ape/2022-04-10
http load test & http protocol fixes
This commit is contained in:
commit
7c3d5fc452
3 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ log = "0.4"
|
||||||
mimalloc = { version = "0.1", default-features = false }
|
mimalloc = { version = "0.1", default-features = false }
|
||||||
rand = { version = "0.8", features = ["small_rng"] }
|
rand = { version = "0.8", features = ["small_rng"] }
|
||||||
rand_distr = "0.4"
|
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"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ impl Connection {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!(
|
::log::warn!(
|
||||||
"deserialize response error with {} bytes read: {:?}, text: {}",
|
"deserialize response error with {} bytes read: {:?}, text: {}",
|
||||||
buffer_position,
|
buffer_position,
|
||||||
err,
|
err,
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ impl AnnounceRequest {
|
||||||
output.write_all(::urlencoding::encode(key.as_str()).as_bytes())?;
|
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")?;
|
output.write_all(b" HTTP/1.1\r\nHost: localhost\r\n\r\n")?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue