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:
parent
876f44ceff
commit
ad6e3dd00d
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue