Skip to content

Commit

Permalink
fix: Send over content-type header to file receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
Threated committed Feb 20, 2024
1 parent 038a6d0 commit b63a259
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,17 @@ async fn send_file(
CONFIG.beam_id.app_name(),
CONFIG.beam_id.as_ref().splitn(3, '.').nth(2).expect("Invalid app id")
));
const RELVANT_HEADERS: [HeaderName; 3] = [
const RELEVANT_HEADERS: [HeaderName; 4] = [
header::CONTENT_LENGTH,
header::CONTENT_DISPOSITION,
header::CONTENT_ENCODING,
header::CONTENT_TYPE
];
let related_headers = headers
.into_iter()
.filter_map(|(maybe_k, v)| {
if let Some(k) = maybe_k {
RELVANT_HEADERS.contains(&k).then_some((k, v))
RELEVANT_HEADERS.contains(&k).then_some((k, v))
} else {
None
}
Expand Down

0 comments on commit b63a259

Please sign in to comment.