Skip to content

Commit

Permalink
don't crash on empty header name
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Sep 2, 2024
1 parent 7279af5 commit 76d2664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/loona/src/h2/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ where
std::str::from_utf8(&value).unwrap_or("<non-utf8-value>"),
);

if &key[..1] == b":" {
if key.first() == Some(&b':') {
if saw_regular_header {
req_error = Some(H2StreamError::BadRequest(
"All pseudo-header fields MUST appear in a field block before all regular field lines (RFC 9113, section 8.3)"
Expand Down

0 comments on commit 76d2664

Please sign in to comment.