Skip to content

Commit

Permalink
Fix endless error loop when bad header name or value
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed Dec 21, 2020
1 parent 6038c91 commit 9a9709d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub unsafe fn header_map_to_http_headers(header_map: *const HeaderMap) -> Vec<He

while !current.is_null() {
let header = &*current;
current = header.next;

let name = match c_char_to_str(header.name) {
None => continue,
Some(s) => s,
Expand All @@ -48,8 +50,6 @@ pub unsafe fn header_map_to_http_headers(header_map: *const HeaderMap) -> Vec<He
name: name.to_string(),
value: value.to_string(),
});

current = header.next;
}

headers
Expand Down

0 comments on commit 9a9709d

Please sign in to comment.