Skip to content

Commit

Permalink
Fix capitalization of header for is('ajax')
Browse files Browse the repository at this point in the history
The code makes a case-sensitive compare to  'XMLHttpRequest', so anyone manually setting it to XmlHttpRequest per this doc would run into issues of it not showing up as is('ajax').  I also capitalized With in the header name, since that's what jQuery sends, and case doesn't matter there (since it's pulled from the $_SERVER array which is all-caps)
  • Loading branch information
cincodenada committed Jul 1, 2014
1 parent b1bd74f commit 8952387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/controllers/request-response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ There are several built-in detectors that you can use:
* ``is('head')`` Check to see whether the current request is HEAD.
* ``is('options')`` Check to see whether the current request is OPTIONS.
* ``is('ajax')`` Check to see whether the current request came with
X-Requested-with = XmlHttpRequest.
X-Requested-With = XMLHttpRequest.
* ``is('ssl')`` Check to see whether the request is via SSL
* ``is('flash')`` Check to see whether the request has a User-Agent of Flash
* ``is('mobile')`` Check to see whether the request came from a common list
Expand Down

0 comments on commit 8952387

Please sign in to comment.