Skip to content

Commit

Permalink
fix: headers causing panic in invalid value to string conversion (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox authored Jul 25, 2024
1 parent 1fb2a1f commit 569ea16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ impl Headers {

for (key, value) in req_headers {
let key = key.to_string().to_lowercase();
let value = value.to_str().unwrap().to_string();
let value = match value.to_str() {
Ok(value) => value.to_string(),
Err(_) => continue,
};
headers.headers.entry(key).or_default().push(value);
}

Expand Down

0 comments on commit 569ea16

Please sign in to comment.