1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-04-10 20:04:05 +00:00

Even more logging

This commit is contained in:
Maciej Hirsz 2019-11-06 16:58:33 +01:00
parent bf6bd2660f
commit 6052452094

View file

@ -549,7 +549,7 @@ where
error!("Invalid UTF-8 encoding");
}
Message::Text(std::str::from_utf8(&data)?.to_string())
Message::Text(text?.to_string())
} else {
Message::Text(String::new())
})
@ -604,8 +604,15 @@ where
match self.collector.take() {
Collector::Text(mut buf) => {
buf.extend_from_slice(data);
let text = std::str::from_utf8(&buf);
if text.is_err() {
error!("Invalid UTF-8 encoding");
}
Some(Message::Text(
std::str::from_utf8(&buf)?.to_string()
text?.to_string()
))
}
Collector::Binary(mut buf) => {