mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add comment to BROWSER_LIKE_ACCEPTS [ci skip]
The concept of treating Accept header lists including "*/*" as identifying the request as coming from a browser, and allowing the mime negotiation to fall back to a HTML response, was introduced in commits1310231c15
anddc5300adb6
. I am adding the comment (based on the commit messages of the two commits mentioned) because it is far from obvious why this regex exists and what it does. Co-authored-by: Matthew Riddle <mriddle89@gmail.com>
This commit is contained in:
parent
f2df77709f
commit
39e3a75e93
1 changed files with 2 additions and 0 deletions
|
@ -152,6 +152,8 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
private
|
||||
# We use normal content negotiation unless you include */* in your list,
|
||||
# in which case we assume you're a browser and send HTML.
|
||||
BROWSER_LIKE_ACCEPTS = /,\s*\*\/\*|\*\/\*\s*,/
|
||||
|
||||
def params_readable? # :doc:
|
||||
|
|
Loading…
Reference in a new issue