Skip to content

Commit

Permalink
Merge branch 'master' into modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2424 authored Mar 20, 2024
2 parents f73253d + c3d554a commit 85b19b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 0 additions & 7 deletions ci/compliance/specs/rfc9114/todo/4.2.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
target = "https://www.rfc-editor.org/rfc/rfc9114#section-4.2"

[[TODO]]
quote = '''
A request or
response containing uppercase characters in field names MUST be
treated as malformed.
'''

[[TODO]]
quote = '''
An endpoint MUST NOT generate
Expand Down
8 changes: 7 additions & 1 deletion h3/src/proto/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,15 @@ impl Field {
//# character not permitted in a field value MUST be treated as
//# malformed.

//= https://www.rfc-editor.org/rfc/rfc9114#section-4.2
//= type=implication
//# A request or
//# response containing uppercase characters in field names MUST be
//# treated as malformed.

if name[0] != b':' {
return Ok(Field::Header((
HeaderName::from_bytes(name).map_err(|_| HeaderError::invalid_name(name))?,
HeaderName::from_lowercase(name).map_err(|_| HeaderError::invalid_name(name))?,
HeaderValue::from_bytes(value.as_ref())
.map_err(|_| HeaderError::invalid_value(name, value))?,
)));
Expand Down

0 comments on commit 85b19b1

Please sign in to comment.