aquatic_http_protocol: fail scrape parse with no info hashes

This commit is contained in:
Joakim Frostegård 2021-10-27 12:14:14 +02:00
parent b7d61cecd9
commit c02f8f228e

View file

@ -238,6 +238,10 @@ impl Request {
Ok(Request::Announce(request))
} else {
if info_hashes.is_empty() {
return Err(anyhow::anyhow!("No info hashes sent"));
}
let request = ScrapeRequest { info_hashes };
Ok(Request::Scrape(request))