Loading crates/s3s/src/host.rs +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ fn parse_host_header<'a>(base_domain: &'a str, host: &'a str) -> Option<VirtualH if let Some(bucket) = host.strip_suffix(base_domain).and_then(|h| h.strip_suffix('.')) { return Some(VirtualHost::with_bucket(base_domain, bucket)); }; } None } Loading crates/s3s/src/http/aws_chunked_stream.rs +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ impl AwsChunkedStream { None => break, Some(Err(e)) => return Err(AwsChunkedStreamError::Underlying(e)), Some(Ok(remaining_bytes)) => prev_bytes = remaining_bytes, }; } if let Ok((_, meta)) = parse_chunk_meta(&buf) { meta } else { Loading crates/s3s/src/http/multipart.rs +5 −5 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ where None => return Err(MultipartError::InvalidFormat), Some(Err(e)) => return Err(MultipartError::Underlying(e)), Some(Ok(bytes)) => buf.extend_from_slice(&bytes), }; } // try to parse match try_parse(body, pat, &buf, &mut fields, boundary) { Loading Loading @@ -139,7 +139,7 @@ where Some(line) => { if line != pat_without_crlf { return Ok(Err(MultipartError::InvalidFormat)); }; } } } } Loading @@ -148,7 +148,7 @@ where return Ok(Err(MultipartError::InvalidFormat)); } } }; } let mut headers = [httparse::EMPTY_HEADER; 2]; loop { Loading Loading @@ -280,7 +280,7 @@ impl FileStream { None => return Err(FileStreamError::Incomplete), Some(Err(e)) => return Err(FileStreamError::Underlying(e)), Some(Ok(b)) => bytes = b, }; } state = 2; continue 'dfa; } Loading Loading @@ -318,7 +318,7 @@ impl FileStream { None => return Err(FileStreamError::Incomplete), Some(Err(e)) => return Err(FileStreamError::Underlying(e)), Some(Ok(b)) => buf.extend_from_slice(&b), }; } bytes = Bytes::from(mem::take(&mut buf)); state = 2; continue 'dfa; Loading Loading
crates/s3s/src/host.rs +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ fn parse_host_header<'a>(base_domain: &'a str, host: &'a str) -> Option<VirtualH if let Some(bucket) = host.strip_suffix(base_domain).and_then(|h| h.strip_suffix('.')) { return Some(VirtualHost::with_bucket(base_domain, bucket)); }; } None } Loading
crates/s3s/src/http/aws_chunked_stream.rs +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ impl AwsChunkedStream { None => break, Some(Err(e)) => return Err(AwsChunkedStreamError::Underlying(e)), Some(Ok(remaining_bytes)) => prev_bytes = remaining_bytes, }; } if let Ok((_, meta)) = parse_chunk_meta(&buf) { meta } else { Loading
crates/s3s/src/http/multipart.rs +5 −5 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ where None => return Err(MultipartError::InvalidFormat), Some(Err(e)) => return Err(MultipartError::Underlying(e)), Some(Ok(bytes)) => buf.extend_from_slice(&bytes), }; } // try to parse match try_parse(body, pat, &buf, &mut fields, boundary) { Loading Loading @@ -139,7 +139,7 @@ where Some(line) => { if line != pat_without_crlf { return Ok(Err(MultipartError::InvalidFormat)); }; } } } } Loading @@ -148,7 +148,7 @@ where return Ok(Err(MultipartError::InvalidFormat)); } } }; } let mut headers = [httparse::EMPTY_HEADER; 2]; loop { Loading Loading @@ -280,7 +280,7 @@ impl FileStream { None => return Err(FileStreamError::Incomplete), Some(Err(e)) => return Err(FileStreamError::Underlying(e)), Some(Ok(b)) => bytes = b, }; } state = 2; continue 'dfa; } Loading Loading @@ -318,7 +318,7 @@ impl FileStream { None => return Err(FileStreamError::Incomplete), Some(Err(e)) => return Err(FileStreamError::Underlying(e)), Some(Ok(b)) => buf.extend_from_slice(&b), }; } bytes = Bytes::from(mem::take(&mut buf)); state = 2; continue 'dfa; Loading