-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IfMatch succeeds decode without values given (for example) #145
Comments
Whether a certain header type should consider an empty value a header is probably worth discussing in each case. But I did want to point out that there is a method, |
So you think I should rather open an issue in axum stating that the handling is actually incorrect? |
After further discussion and looking at documentation, an empty value should either yield the header's default value or error. |
@seanmonstar to be clear (though I don't intend to work on it myself), in the specific case of |
Hi!
Axum's change to
TypedHeader
(via this issue) made it that decode is called on an empty iterator of values.However,
IfMatch
and probably more headers now always succeed even if the header was not present and return an emptyIfMatch(EntityTagRange::Tags(""))
.It should probably fail if there is no value present.
Thank you!
The text was updated successfully, but these errors were encountered: