Skip to content

Commit e8c1211

Browse files
Getting: "Error: invalid type: found string "Authorization", expected a borrowed string for key "default.headers.Authorization" in config.yaml YAML file". Updates header parsing to borrow string when parsing. (#213)
1 parent b12df81 commit e8c1211

File tree

1 file changed

+4
-4
lines changed
  • crates/apollo-mcp-server/src/runtime

1 file changed

+4
-4
lines changed

crates/apollo-mcp-server/src/runtime/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ mod parsers {
7979

8080
// While there are entries remaining in the input, add them
8181
// into our map.
82-
while let Some((key, value)) = map.next_entry()? {
83-
let key = HeaderName::from_str(key)
82+
while let Some((key, value)) = map.next_entry::<String, String>()? {
83+
let key = HeaderName::from_str(&key)
8484
.map_err(|e| serde::de::Error::custom(e.to_string()))?;
85-
let value = HeaderValue::from_str(value)
85+
let value = HeaderValue::from_str(&value)
8686
.map_err(|e| serde::de::Error::custom(e.to_string()))?;
8787

8888
parsed.insert(key, value);
@@ -92,7 +92,7 @@ mod parsers {
9292
}
9393
}
9494

95-
deserializer.deserialize_str(MapFromStrVisitor)
95+
deserializer.deserialize_map(MapFromStrVisitor)
9696
}
9797
}
9898

0 commit comments

Comments
 (0)