mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +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=");
|
bytes.extend_from_slice(b"info_hash=");
|
||||||
|
urlencode_20_bytes(info_hash.0, &mut bytes);
|
||||||
for b in info_hash.0.iter() {
|
|
||||||
bytes.push(b'%');
|
|
||||||
bytes.extend_from_slice(format!("{:02x}", b).as_bytes());
|
|
||||||
}
|
|
||||||
|
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue