aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/request.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move request parameter parsing from CGI to AbstractRequest.Jeremy Kemper2007-05-151-0/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Lazy-read request.raw_post from request.bodyJeremy Kemper2007-05-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce the request.body stream. Lazy-read to parse parameters rather than ↵Jeremy Kemper2007-05-151-13/+21
| | | | | | always setting RAW_POST_DATA. Reduces the memory footprint of large binary PUT requests. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6740 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The default respond_to blocks don't set a specific extension anymore, so ↵Rick Olson2007-04-121-1/+3
| | | | | | that both 'show.rjs' and 'show.js.rjs' will work. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6517 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix nil error for requests with empty PATH_INFO header such as those which ↵Tobias Lütke2007-03-191-1/+1
| | | | | | are send by the ScanAlert spider git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6451 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prefer MIME constants to strings. Closes #7707.Jeremy Kemper2007-03-061-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ignore odd charset declaration in CONTENT_TYPE header which would throw off ↵Tobias Lütke2007-03-051-1/+2
| | | | | | mime type lookup. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sans request pleaseDavid Heinemeier Hansson2007-03-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6317 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Request#url that returns the complete URL used for the request [DHH]David Heinemeier Hansson2007-03-041-50/+58
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that rendering will automatically insert the etag header on 200 OK ↵David Heinemeier Hansson2007-02-171-0/+4
| | | | | | responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* In tests, content_type can be nil, which would disturb accepts/formatDavid Heinemeier Hansson2007-02-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a consistent load path to avoid double requires. Fix some scattered Ruby ↵Jeremy Kemper2007-01-281-0/+1
| | | | | | warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Set request.env['REQUEST_URI'] when absent.Jeremy Kemper2007-01-121-5/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove support for json in X-Post-Data-Format header since it's for backward ↵Jeremy Kemper2006-12-061-2/+0
| | | | | | compatibility only. References #4185. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* respond_to recognizes JSON. render :json => @person.to_json automatically ↵Jeremy Kemper2006-12-061-0/+2
| | | | | | sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. References #4185. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Request#format to return the format used for the request as a mime ↵David Heinemeier Hansson2006-12-021-0/+10
| | | | | | type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Added GET-masquarading for HEAD, so request.method will return :get even ↵David Heinemeier Hansson2006-11-231-4/+9
| | | | | | for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you dont even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix relative URL root matching problemsJamis Buck2006-10-091-4/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5272 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restrict Request Method hacking with ?_method to POST requests. [Rick Olson]Rick Olson2006-08-011-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4644 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added map.resources from the Simply Restful plugin (backwards incompatible ↵David Heinemeier Hansson2006-07-311-1/+3
| | | | | | with the plugin!) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Documentation for AbstractRequest. Closes #4895. [kevin.clark@gmail.com]Marcel Molina2006-04-261-3/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4277 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Performance speedup for ActionController (closes #4174) [Stefan Kaes] ↵David Heinemeier Hansson2006-03-201-20/+20
| | | | | | Includes caching of filter chains -- be on the lookout for problems with that! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ability for relative_url_root to be specified via an environment ↵Nicholas Seckar2006-03-181-2/+11
| | | | | | variable RAILS_RELATIVE_URL_ROOT. Closes #4243. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3931 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prepare for mime type reordering depending on the branch [DHH]David Heinemeier Hansson2006-03-121-3/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mime types are separated by a comma, not semicolon, in the Accept header. ↵David Heinemeier Hansson2006-03-121-2/+2
| | | | | | Also switch all internal configuration of mime types away from strings and over to Mime::Type [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added synonym and custom type handling to respond_to [DHH]David Heinemeier Hansson2006-03-121-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Assume that we accept what we give [DHH]David Heinemeier Hansson2006-03-121-3/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added better support for using the same actions to output for different ↵David Heinemeier Hansson2006-03-111-6/+13
| | | | | | sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Proper options for XmlSimpleDavid Heinemeier Hansson2006-03-071-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new infrastructure support for REST webservices.Tobias Lütke2006-03-051-34/+15
| | | | | | | | | | | | | | | | | By default application/xml posts are handled by creating a XmlNode object with the same name as the root element of the submitted xml. M$ ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data| node = REXML::Document.new(post) { node.root.name => node.root } end XmlSimple and Yaml web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functio$ request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Luetke] Closes #4081 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Major components cleanup and speedup. Closes #3527.Jeremy Kemper2006-02-091-24/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that SSL would not correctly be detected when running lighttpd/fcgi ↵David Heinemeier Hansson2006-01-231-1/+1
| | | | | | behind lighttpd w/mod_proxy (closes #3548) [stephen_purcell@yahoo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3467 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More robust relative url root discovery for SCGI compatibility. This solves ↵Jeremy Kemper2005-12-081-1/+2
| | | | | | the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint. References #3070. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document request.env and request.host. Strip trailing whitespace.Jeremy Kemper2005-11-201-15/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3103 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update/clean up AP documentation (rdoc)Jamis Buck2005-10-161-7/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Request#host_with_port to use the standard port when Rails is behind a ↵Nicholas Seckar2005-10-151-2/+10
| | | | | | proxy. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Request#domain caused an exception if the domain header wasn't ↵David Heinemeier Hansson2005-09-201-1/+2
| | | | | | set in the original http request #1795 [Michael Koziarski] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache relative_url_root for all webservers, not just Apache #2193 [skae]David Heinemeier Hansson2005-09-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2246 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that request.path never returns nil. Closes #1675Nicholas Seckar2005-09-111-6/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* AbstractRequest#domain returns nil when host is an ip address #2012 ↵Jamis Buck2005-09-021-0/+2
| | | | | | [kevin.clark@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved performance with 5-30% through a series of Action Pack ↵David Heinemeier Hansson2005-07-231-23/+26
| | | | | | optimizations #1811 [Stefan Kaes] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Request#subdomains handle "foo.foo.com" correctlyJamis Buck2005-07-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved performance of Routes generation by a factor of 5 #1434 [Nicholas ↵David Heinemeier Hansson2005-06-241-5/+8
| | | | | | Seckar] Added named routes (NEEDS BETTER DESCRIPTION) #1434 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved AbstractRequest documentation. Closes #1483.Jeremy Kemper2005-06-241-23/+47
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :xhr => true/false option to verify so you can ensure that a request ↵David Heinemeier Hansson2005-06-211-1/+1
| | | | | | is coming from an Ajax call or not #1464 [Thomas Fuchs] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1463 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed relative urls support for lighttpd #1048 [Nicholas ↵David Heinemeier Hansson2005-06-181-4/+13
| | | | | | Seckar/maznawak@nerim.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1450 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated redirect_to_path and redirect_to_url in favor of letting ↵David Heinemeier Hansson2005-05-221-19/+18
| | | | | | redirect_to do the right thing when passed either a path or url. Introduced r as a unified method for render (still under construction) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made the post_format work with content-typeDavid Heinemeier Hansson2005-05-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1337 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made the post_format work with content-typeDavid Heinemeier Hansson2005-05-201-2/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache relative_url_root and optimize path #1232 [skaen]David Heinemeier Hansson2005-05-191-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de