In our recent optimizations to route matching performance we introduced an issue with routes that had an optional segment which wasn't separated by a "." or "/".
ActionDispatch::Http::ParameterFilter
ActionDispatch::Response#content_type