Skip to content
Snippets Groups Projects
Commit 94944f32 authored by codecraft's avatar codecraft :crocodile:
Browse files

Remove unnecessary println! and updated some of the code

Added TODO: file
parent 61af39db
No related branches found
No related tags found
1 merge request!1Initial feature merge
1. If you collect an iterator which you don't index in, you don't need to collect it
2. avoid temporary hashmaps
3. rewrite POST request stuff TICK
4. Client struct
5. Mime-Display new implemented
6. Remove unwraps
7. Reusable allocations
API design 3. No decisions for the caller
...@@ -61,7 +61,6 @@ pub async fn handle_connection(mut stream: TcpStream, mountpoints: Vec<MountPoin ...@@ -61,7 +61,6 @@ pub async fn handle_connection(mut stream: TcpStream, mountpoints: Vec<MountPoin
buffer: vec![], buffer: vec![],
}; };
if request.can_have_body() { if request.can_have_body() {
println!("{:#?}", request.headers);
let length = if let Some(len) = request let length = if let Some(len) = request
.headers .headers
.iter() .iter()
......
...@@ -221,7 +221,7 @@ impl Request<'_> { ...@@ -221,7 +221,7 @@ impl Request<'_> {
let end_boundary = format!("{temp_bound}--\r").as_bytes().to_owned(); let end_boundary = format!("{temp_bound}--\r").as_bytes().to_owned();
temp_bound.push('\r'); temp_bound.push('\r');
let boundary = temp_bound.as_bytes(); let boundary = temp_bound.as_bytes();
Request::get_multipart_data(data, boundary, &end_boundary, &mut keymap); Self::get_multipart_data(data, boundary, &end_boundary, &mut keymap);
} }
_ => { _ => {
return Err(ParseFormError { return Err(ParseFormError {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment