Skip to content

Commit 9a9709d

Browse files
committed
Fix endless error loop when bad header name or value
1 parent 6038c91 commit 9a9709d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/http/ffi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ pub unsafe fn header_map_to_http_headers(header_map: *const HeaderMap) -> Vec<He
3535

3636
while !current.is_null() {
3737
let header = &*current;
38+
current = header.next;
39+
3840
let name = match c_char_to_str(header.name) {
3941
None => continue,
4042
Some(s) => s,
@@ -48,8 +50,6 @@ pub unsafe fn header_map_to_http_headers(header_map: *const HeaderMap) -> Vec<He
4850
name: name.to_string(),
4951
value: value.to_string(),
5052
});
51-
52-
current = header.next;
5353
}
5454

5555
headers

0 commit comments

Comments
 (0)