Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If ruby/rack tried to send an empty header, e.g app = Proc.new do |env| ["200", { "Content-Type" => "text/plain", "X-Empty-Header" => nil, }, ["Hello World\n"]] end run app you would get an error like 2023/10/20 11:24:56 [error] 24829#24829 [unit] nginx#10: Ruby: Wrong header entry 'value' from application 2023/10/20 11:24:56 [error] 24829#24829 [unit] nginx#10: Ruby: Failed to run ruby script Empty headers are a thing, so we need to allow the ruby type T_NIL (along with T_STRING) as a valid header value. This factors out the setting of value & value_end into a macro as what these get set to now depends on if we have a T_NIL or a T_STRING and this prevents an increase in duplicated code. Signed-off-by: Andrew Clayton <[email protected]>
- Loading branch information