I'm not sure why you put the directive inside Rack::Utils
instead of Rack::Request where it is the only user.
I suspect there's Rack::Utils users who do not use Rack::Request.
Not sure if the extra Array creation and block invocation makes
a meaningful performance difference for anyone.
Otherwise I guess it's fine (not that I can merge your change).
Note: I reviewed by adding the following line to my .git/config
at the remote configured for git://github.com/rack/rack.git
fetch = +refs/pull/*:refs/remotes/pull/*
Then "git fetch", and "git log -p --color-words pull/1001/head"
This was following commit 13397c7963b30f1d05e316d4de1930a6f81abf38
The "--color-words" switch made the test/spec_request.rb changes
much more readable.