1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

13 commits

Author SHA1 Message Date
David Heinemeier Hansson
0d0d46222c Add Request#formats=(extensions) that lets you set multiple formats directly in a prioritized order 2012-08-14 22:09:43 -05:00
Bogdan Gusiev
ef7815b15d Add missing requires in routes 2012-04-23 14:31:38 +03:00
ogeidix
1ac802fe3c Check Accept and Content-Type headers before evaluating them in xhr requests. Closes #2119
An xhr request must have an "Accept" or "Content-type" header in order to be considered a request with valid_accept_header.
2011-07-19 22:05:16 +02:00
José Valim
73c94ed97a Add ignore_accept_header config to AD::Request. 2011-05-02 23:38:57 +02:00
Neeraj Singh
d04a21b362 declare regex as a constant
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
eb6ccc9953 do not assume that there is no space between
leading */* and comma

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
61950a4b05 current code ignores http header "Accept" if it
has ....,*/* .

It is possible to a device to send
request such that */* appear at the beginning of the
"Accept" header. This patch ensures that "Accept" header
is ignored for such cases too.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
7d5b097357 use_accept_header is no longer supported 2010-11-21 03:29:44 +01:00
Joost Baaij
4a56f8f314 escape constants that should not be linked to 2010-08-27 22:47:11 +02:00
Paul Sadauskas
dc5300adb6 Slightly less annoying check for acceptable mime_types. This allows Accept: application/json, application/jsonp (and the like), but still blacklists browsers. Essentially, we use normal content negotiation unless you include */* in your list, in which case we assume you're a browser and send HTML [#3541 state:resolved] 2010-04-01 17:42:46 -07:00
wycats
77a2a3d9b3 Request#content_type exists in Rack::Request, and other parts of Rack::Request expect
it to return a String. Split the Rails API so that Request#content_type returns
a String, and Request#content_mime_type returns a Mime::Type object.
2010-03-28 13:40:38 -07:00
José Valim
ec0973c2ab Remove uneeded methods. 2010-03-10 16:44:24 +01:00
José Valim
92f49b5f1e Split ActionDispatch http in smaller chunks. 2010-01-16 15:45:07 +01:00