diff options
author | Stephen Becker IV <github@deathbyescalator.com> | 2013-06-18 14:22:30 -0700 |
---|---|---|
committer | Stephen Becker IV <github@deathbyescalator.com> | 2013-06-19 06:29:52 -0700 |
commit | 8ffd139edd062fe3e888895d4af80730a0798758 (patch) | |
tree | 4c2b60f55cb322a4739363a4125ccc6de78ff84e /actionpack/lib/action_dispatch | |
parent | 0f89689b2357f39da52515b83391db58689a1361 (diff) | |
download | rails-8ffd139edd062fe3e888895d4af80730a0798758.tar.gz rails-8ffd139edd062fe3e888895d4af80730a0798758.tar.bz2 rails-8ffd139edd062fe3e888895d4af80730a0798758.zip |
Fix undefined method `ref' for nil:NilClass for bad accept headers
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 61dbf2b96c..ef144c3c76 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -175,7 +175,7 @@ module Mime def parse(accept_header) if accept_header !~ /,/ accept_header = accept_header.split(PARAMETER_SEPARATOR_REGEXP).first - parse_trailing_star(accept_header) || [Mime::Type.lookup(accept_header)] + parse_trailing_star(accept_header) || [Mime::Type.lookup(accept_header)].compact else list, index = AcceptList.new, 0 accept_header.split(',').each do |header| |