diff --git a/gotham_restful/src/routing.rs b/gotham_restful/src/routing.rs index b8d8c56..617e59c 100644 --- a/gotham_restful/src/routing.rs +++ b/gotham_restful/src/routing.rs @@ -271,6 +271,10 @@ impl From>> for MaybeMatchAcceptHeader { fn from(types : Option>) -> Self { + let types = match types { + Some(types) if types.is_empty() => None, + types => types + }; Self { matcher: types.map(AcceptHeaderRouteMatcher::new) }