1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-22 20:52:27 +00:00

make sure that 204-responses can be accepted

This commit is contained in:
Dominic 2020-04-22 11:46:15 +02:00
parent 876f44ceff
commit ad6e3dd00d
Signed by: msrd0
GPG key ID: DCC8C247452E98F9

View file

@ -271,6 +271,10 @@ impl From<Option<Vec<Mime>>> for MaybeMatchAcceptHeader
{
fn from(types : Option<Vec<Mime>>) -> Self
{
let types = match types {
Some(types) if types.is_empty() => None,
types => types
};
Self {
matcher: types.map(AcceptHeaderRouteMatcher::new)
}