-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Grape allows invalid headers to be set. #2334
Comments
For Grape users, is the real issue is that it works in Grape with Rack 2.x and not 3.x causing a |
Other breaking changes with Rack 3, #2298. |
No, it's nothing to do with Rack 3, it's always been invalid, even Rack 2 spec does not allow non-string header values. |
But it works for users today, except when otherwise (described in socketry/protocol-rack#2). I think Grape should adhere to spec. I like the option of doing |
If you put I think you should encourage people to use |
Follow up from socketry/protocol-rack#2 (comment).
The following implementation allows non-string header values.
grape/lib/grape/dsl/headers.rb
Line 13 in d1dfdcc
Technically, all headers should be strings, according to the rack spec.
I'm not sure if we should change this. I see several options:
@header
key values to string values, (or array of string values, allowed by Rack 3+).The text was updated successfully, but these errors were encountered: