From 02ee7a25c6fe8c63a6c39ebad4a15e13bbf05346 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 6 Aug 2022 17:55:25 +0900 Subject: [PATCH] add debug message for h3 body size --- src/proxy/proxy_h3.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy/proxy_h3.rs b/src/proxy/proxy_h3.rs index c7a2eb9..ba81d61 100644 --- a/src/proxy/proxy_h3.rs +++ b/src/proxy/proxy_h3.rs @@ -92,10 +92,10 @@ where let mut sender = body_sender; let mut size = 0usize; while let Some(mut body) = recv_stream.recv_data().await? { - debug!("HTTP/3 incoming request body"); + debug!("HTTP/3 incoming request body: remaining {}", body.remaining()); size += body.remaining(); if size > max_body_size { - error!("Exceeds max request body size for HTTP/3"); + error!("Exceeds max request body size for HTTP/3: received {}", size); return Err(RpxyError::Proxy("Exceeds max request body size for HTTP/3".to_string())); } // create stream body to save memory, shallow copy (increment of ref-count) to Bytes using copy_to_bytes