Permalink
Browse files

Change request.accepts to an empty array if request.accepts is `*/*`.

  • Loading branch information...
namusyaka committed Oct 17, 2013
1 parent 9e39d9c commit 9ada9a606ab298946a879bafdc07291d7461e41b
Showing with 1 addition and 0 deletions.
  1. +1 −0 padrino-core/lib/padrino-core/application/routing.rb
@@ -859,6 +859,7 @@ def provides(*types)
mime_types = types.map { |t| mime_type(t) }.compact
url_format = params[:format].to_sym if params[:format]
accepts = request.accept.map(&:to_str)
accepts = [] if accepts == ["*/*"]
# Per rfc2616-sec14:
# Assume */* if no ACCEPT header is given.

0 comments on commit 9ada9a6

Please sign in to comment.