mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Upgrade itoa to version 1
This commit is contained in:
parent
391c55a19e
commit
9ba72ce3fd
4 changed files with 5 additions and 5 deletions
|
|
@ -416,7 +416,7 @@ impl Connection {
|
|||
let mut response_bytes = Vec::with_capacity(39 + content_len_num_digits + body.len());
|
||||
|
||||
response_bytes.extend_from_slice(b"HTTP/1.1 200 OK\r\nContent-Length: ");
|
||||
::itoa::write(&mut response_bytes, content_len)?;
|
||||
response_bytes.extend_from_slice(::itoa::Buffer::new().format(content_len).as_bytes());
|
||||
response_bytes.extend_from_slice(b"\r\n\r\n");
|
||||
response_bytes.append(&mut body);
|
||||
response_bytes.extend_from_slice(b"\r\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue