mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52:28 +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
|
fn from(types : Option<Vec<Mime>>) -> Self
|
||||||
{
|
{
|
||||||
|
let types = match types {
|
||||||
|
Some(types) if types.is_empty() => None,
|
||||||
|
types => types
|
||||||
|
};
|
||||||
Self {
|
Self {
|
||||||
matcher: types.map(AcceptHeaderRouteMatcher::new)
|
matcher: types.map(AcceptHeaderRouteMatcher::new)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue