Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,14 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
loop {
let bytes_read = buf_reader.read_exact(&mut buffer).await;
match bytes_read {
Ok(0) => {
buffer.fill(0);
break;
}
Ok(0) => break,
Ok(_) => {
len += buffer.len();
if len >= body_size as usize {
buffer.fill(0);
break;
}
}
Err(_) => {
break;
}
Err(_) => break,
}
}
None
Expand All @@ -90,16 +84,9 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
loop {
let bytes_read = buf_reader.read_exact(&mut buffer).await;
match bytes_read {
Ok(0) => {
buffer.fill(0);
break;
}
Ok(_) => {
buffer.fill(0);
}
Err(_) => {
break;
}
Ok(0) => break,
Ok(_) => {}
Err(_) => break,
}
}
None
Expand All @@ -113,7 +100,6 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
let mut body = Vec::with_capacity(body_size as usize);
buf_reader.take(body_size).read_to_end(&mut body).await.unwrap();
let form_data = parse_form_data(&form_boundary,&body);
body.fill(0);
Some(form_data)
}
None => {
Expand All @@ -132,7 +118,6 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
let mut body = Vec::with_capacity(body_size as usize);
buf_reader.take(body_size).read_to_end(&mut body).await.unwrap();
let form_data = parse_form_url_encoded(&body);
body.fill(0);
Some(form_data)
}
None => {
Expand Down
1 change: 0 additions & 1 deletion src/results/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ pub fn draw_result (data : &TelemetryData) -> Vec<u8> {
if let Err(e) = img.write_to(&mut buffer, ImageFormat::Jpeg) {
error!("Image writer buffer error : {e}")
}
img.fill(0);
drop(img);

buffer.into_inner()
Expand Down