mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
http protocol: explicitly check for /scrape path
This commit is contained in:
parent
1b5fbe8775
commit
ffc5dc5227
1 changed files with 3 additions and 1 deletions
|
|
@ -300,10 +300,12 @@ impl Request {
|
||||||
Ok(Request::Announce(AnnounceRequest::from_query_string(
|
Ok(Request::Announce(AnnounceRequest::from_query_string(
|
||||||
query_string,
|
query_string,
|
||||||
)?))
|
)?))
|
||||||
} else {
|
} else if location == "/scrape" {
|
||||||
Ok(Request::Scrape(ScrapeRequest::from_query_string(
|
Ok(Request::Scrape(ScrapeRequest::from_query_string(
|
||||||
query_string,
|
query_string,
|
||||||
)?))
|
)?))
|
||||||
|
} else {
|
||||||
|
Err(anyhow::anyhow!("Path must be /announce or /scrape"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue