mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic http protocol: ScrapeRequest::to_bytes(): use urlencode_20_bytes
This commit is contained in:
parent
ca935b7d46
commit
dae83a1835
1 changed files with 1 additions and 5 deletions
|
|
@ -93,11 +93,7 @@ impl ScrapeRequest {
|
|||
}
|
||||
|
||||
bytes.extend_from_slice(b"info_hash=");
|
||||
|
||||
for b in info_hash.0.iter() {
|
||||
bytes.push(b'%');
|
||||
bytes.extend_from_slice(format!("{:02x}", b).as_bytes());
|
||||
}
|
||||
urlencode_20_bytes(info_hash.0, &mut bytes);
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue