Skip to content

Commit

Permalink
Don't need to split header for Rack 3
Browse files Browse the repository at this point in the history
  • Loading branch information
schinery committed Oct 23, 2023
1 parent 29a1999 commit 26054c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grape/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def transform_header(header)
if Gem::Version.new(Rack.release) < Gem::Version.new('3')
-header[5..].split('_').each(&:capitalize!).join('-')
else
-header[5..].split('_').each(&:downcase!).join('-')
-header[5..].tr('_', '-').downcase!
end
end
end
Expand Down

0 comments on commit 26054c7

Please sign in to comment.