From f0a3c224fb87111af17acce7c20cb3d3275d6612 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 11 Aug 2021 22:09:30 +0100 Subject: [PATCH] add debug log back --- actix-http/src/h1/chunked.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/actix-http/src/h1/chunked.rs b/actix-http/src/h1/chunked.rs index 617922267..1224ce08c 100644 --- a/actix-http/src/h1/chunked.rs +++ b/actix-http/src/h1/chunked.rs @@ -1,7 +1,6 @@ use std::{io, task::Poll}; use bytes::{Buf as _, Bytes, BytesMut}; -use log::trace; macro_rules! byte ( ($rdr:ident) => ({ @@ -79,15 +78,17 @@ impl ChunkedState { Poll::Ready(Ok(ChunkedState::Size)) } - None => Poll::Ready(Err(io::Error::new( - io::ErrorKind::InvalidInput, - "Invalid chunk size line: Size is too big", - ))), + None => { + log::debug!("chunk size would overflow u64"); + Poll::Ready(Err(io::Error::new( + io::ErrorKind::InvalidInput, + "Invalid chunk size line: Size is too big", + ))) + } } } fn read_size_lws(rdr: &mut BytesMut) -> Poll> { - trace!("read_size_lws"); match byte!(rdr) { // LWS can follow the chunk size, but no more digits can come b'\t' | b' ' => Poll::Ready(Ok(ChunkedState::SizeLws)), @@ -129,7 +130,7 @@ impl ChunkedState { rem: &mut u64, buf: &mut Option, ) -> Poll> { - trace!("Chunked read, remaining={:?}", rem); + log::trace!("Chunked read, remaining={:?}", rem); let len = rdr.len() as u64; if len == 0 {