Sorry I didn't forgot I was commenting on an outdated diff (it is still there just not obvious in the GitHub UX https://github.com/rack/rack/pull/457#discussion_r8895465). Copied below:

Found a bug in my suggested code in my testing. Content-Type isn't always set.

I ended up changing my version to this:

````return false if @compressible_types && !(headers.has_key('Content-Type') && @compressible_types.include?(headers['Content-Type'][/[^;]*/]))````