-
Notifications
You must be signed in to change notification settings - Fork 30
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
form-decode : catch-all return nil is bad #22
Comments
If I recall, it was for consistency with the other functions, and because most of the time we want to be permissive about bad form data. I'd be cautiously open to adding new functions with exceptions and possibly deprecating the existing ones. If so, we'd probably want to be consistent and throw parsing errors as well. |
it could also leave the permissive behaviour but require a non- the 1.0.1 behaviour was to default the i'm happy to do a PR if you want ? |
Throwing an exception on a non-string encoding sounds fine. Out of interest, where does HTTP say it should be ISO-8859-1? |
http 1.1 sec 3.7.1 - although that seems only to apply to |
the
form-decode-str
behaviour of catching anyException
, logging nothing and returningnil
just caused a painful morning, in combination with the 1.0.1 -> 1.1.0 change of not assumingUTF-8
if theform-decode
encoding
param isnil
https://github.com/yapsterapp/ring-codec/blob/default-decode-charset/src/ring/util/codec.clj#L131
is there a reason a decode exception is not propagated ? returning
nil
with no logging seems like the worst of all worlds...The text was updated successfully, but these errors were encountered: