http protocol: rename methods for writing to and parsing from bytes

This commit is contained in:
Joakim Frostegård 2024-01-29 19:52:41 +01:00
parent 3c906f48ee
commit 38de05a6c4
7 changed files with 30 additions and 30 deletions

View file

@ -389,7 +389,7 @@ where
let mut position = RESPONSE_HEADER.len();
let body_len = response
.write(&mut &mut self.response_buffer[position..])
.write_bytes(&mut &mut self.response_buffer[position..])
.map_err(ConnectionError::ResponseBufferWrite)?;
position += body_len;

View file

@ -25,7 +25,7 @@ pub fn parse_request(
match http_request.parse(buffer).with_context(|| "httparse")? {
httparse::Status::Complete(_) => {
let path = http_request.path.ok_or(anyhow::anyhow!("no http path"))?;
let request = Request::from_http_get_path(path)?;
let request = Request::parse_http_get_path(path)?;
let opt_peer_ip = if config.network.runs_behind_reverse_proxy {
let header_name = &config.network.reverse_proxy_ip_header_name;