Skip to content

Commit a7cee37

Browse files
committed
Merge pull request #1466 from padrino/fix-sinatra-edge
Change request.accepts to an empty array if request.accepts is `*/*`. Fixes #1465
2 parents 69aa8d2 + 9ada9a6 commit a7cee37

File tree

1 file changed

+1
-0
lines changed
  • padrino-core/lib/padrino-core/application

1 file changed

+1
-0
lines changed

padrino-core/lib/padrino-core/application/routing.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ def provides(*types)
859859
mime_types = types.map { |t| mime_type(t) }.compact
860860
url_format = params[:format].to_sym if params[:format]
861861
accepts = request.accept.map(&:to_str)
862+
accepts = [] if accepts == ["*/*"]
862863

863864
# Per rfc2616-sec14:
864865
# Assume */* if no ACCEPT header is given.

0 commit comments

Comments
 (0)