-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
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
val ? header[key.to_s] = val : header.delete(key.to_s) |
Technically, all headers should be strings, according to the rack spec.
header "x-foo", 123
I'm not sure if we should change this. I see several options:
- Emit a warning if it's not a string.
- Convert values to a string.
- Do nothing.
- Later on, map
@header
key values to string values, (or array of string values, allowed by Rack 3+).