diff --git a/src/ruma_wrapper/axum.rs b/src/ruma_wrapper/axum.rs index cec8212604766a84c6938f0d0eb37d82ee167348..c4e1d292c35c9765b64fc4fe66f382171d12276c 100644 --- a/src/ruma_wrapper/axum.rs +++ b/src/ruma_wrapper/axum.rs @@ -315,6 +315,13 @@ fn decode(value: &http::HeaderValue) -> Option<Self> { for entry in parameters.split_terminator(',') { let (name, value) = entry.split_once('=')?; + // It's not at all clear why some fields are quoted and others not in the spec, + // let's simply accept either form for every field. + let value = value + .strip_prefix('"') + .and_then(|rest| rest.strip_suffix('"')) + .unwrap_or(value); + // FIXME: Catch multiple fields of the same name match name { "origin" => origin = Some(value.try_into().ok()?),