Skip to content

Commit

Permalink
fix: generate only valid headers
Browse files Browse the repository at this point in the history
Generate headers following the HTTP/1.1 RFC. See:
https://datatracker.ietf.org/doc/html/rfc7230#section-3.2

Fixes: #30
  • Loading branch information
matusf committed Aug 24, 2023
1 parent 60c891f commit b7b7148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl Arbitrary for Headers {
.iter()
.filter_map(|ref_or_param| match ref_or_param.to_item_ref() {
Parameter::Header { parameter_data, .. } => {
Some((Just(parameter_data.name.clone()), any::<String>()))
Some((Just(parameter_data.name.clone()), "[!-~ \t]*"))
}
_ => None,
})
Expand Down

0 comments on commit b7b7148

Please sign in to comment.