mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Fix error response codes
This commit is contained in:
parent
eaebcb2046
commit
ca85842369
1 changed files with 2 additions and 2 deletions
|
|
@ -76,12 +76,12 @@ async fn connection(stream: TcpStream) -> Result {
|
|||
let mut stream = ACCEPTOR.accept(stream).await?;
|
||||
match parse_request(&mut stream).await {
|
||||
Err(e) => {
|
||||
stream.write_all(b"50 Invalid request.\r\n").await?;
|
||||
stream.write_all(b"59 Invalid request.\r\n").await?;
|
||||
Err(e)
|
||||
}
|
||||
Ok(url) => match get(&url).await {
|
||||
Err(e) => {
|
||||
stream.write_all(b"40 Not found, sorry.\r\n").await?;
|
||||
stream.write_all(b"51 Not found, sorry.\r\n").await?;
|
||||
Err(e)
|
||||
}
|
||||
Ok(response) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue