mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-15 15:33:47 +00:00
fix HTTP response format and improve connection logging
Now curl helps debug invalid requests, hell yeah.
This commit is contained in:
parent
be3f00b51e
commit
e63e463140
1 changed files with 7 additions and 1 deletions
|
|
@ -77,7 +77,13 @@ async fn handle_connection(
|
|||
}
|
||||
};
|
||||
|
||||
stream.write_all(response.as_bytes()).await?;
|
||||
let http_response = format!(
|
||||
"HTTP/1.1 200 OK\r\nContent-Length: {}\r\n\r\n{}",
|
||||
response.len(),
|
||||
response
|
||||
);
|
||||
stream.write_all(http_response.as_bytes()).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue