fix: trim \r from message

mime type couldn't be parsed because of this
This commit is contained in:
DarkCat09 2024-08-01 11:59:32 +04:00
parent 2d3a19c60d
commit 16fc740397
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -79,6 +79,9 @@ impl Client {
message.push(buf[0].into()); message.push(buf[0].into());
} }
} }
if message.last().is_some_and(|c| c == &b'\r') {
message.pop();
}
let message = String::from_utf8(message)?; let message = String::from_utf8(message)?;
Ok(Response::new(status, message, stream)) Ok(Response::new(status, message, stream))
} }