From ad6e3dd00d5271e061616dc676fc63497183528c Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 22 Apr 2020 11:46:15 +0200 Subject: [PATCH] make sure that 204-responses can be accepted --- gotham_restful/src/routing.rs | 4 ++++ 1 file changed, 4 insertions(+) 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) }