Skip to content

Commit b22eed8

Browse files
committed
Added explicit lowercase matching to EncodingType
1 parent adfec62 commit b22eed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/common/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ impl std::fmt::Display for EncodingType {
510510
impl FromStr for EncodingType {
511511
type Err = String;
512512
fn from_str(value: &str) -> Result<Self, Self::Err> {
513-
match value {
513+
match value.to_ascii_lowercase().as_str() {
514514
"application/json" | "" => Ok(EncodingType::Json),
515515
"application/octet-stream" => Ok(EncodingType::Ssz),
516516
_ => Err(format!("unsupported encoding type: {value}")),

0 commit comments

Comments
 (0)