mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_http_protocol: fail scrape parse with no info hashes
This commit is contained in:
parent
b7d61cecd9
commit
c02f8f228e
1 changed files with 4 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue