Rack 3 requires that response headers use lower case keys. To support applications designed for Rack < 3, Roda by default uses Rack::Headers for response headers, which will automatically lower case keys. This is suboptimal for performance. The plain_hash_response_headers plugin allows using a plain hash for response headers, but in order to use it, you must ensure that all response header keys are already lower case. So change all response header keys to lower case. Unfortunately, committee is not rack 3 compliant and does not support lower case response header keys. It indexes into response headers with Content-Type instead of content-type, which breaks on rack 3 unless the headers hash is automatically lower casing keys. Work around this issue by setting the Content-Type header before calling committee's response validation, and deleting it afterward. This can be removed after committee is fixed.
3.0 KiB
3.0 KiB