Rack::Lint enforces SPEC:
## The CGI keys (named without a period) must have String values.
## If the string values for CGI keys contain non-ASCII characters,
## they should use ASCII-8BIT encoding.
env.each { |key, value|
next if key.include? "." # Skip extensions
assert("env variable #{key} has non-string value #{value.inspect}") {
value.kind_of? String
}
next if value.encoding == Encoding::ASCII_8BIT
assert("env variable #{key} has value containing non-ASCII characters and has non-ASCII-8BIT encoding #{value.inspect} encoding: #{value.encoding}") {
value.b !~ /[\x80-\xff]/n
}
}
Thus, enabling Rack::Lint middleware generates an exception:
Rack::Lint::LintError: env variable parsed_body has non-string value
The CGI keys (named without a period) must have String values. suggests a fix would be to rename it to body_parser.document or something like that, to abide by the convention. Although of course it would be a breaking change.
Rack::Lintenforces SPEC:Thus, enabling
Rack::Lintmiddleware generates an exception:The CGI keys (named without a period) must have String values.suggests a fix would be to rename it tobody_parser.documentor something like that, to abide by the convention. Although of course it would be a breaking change.