Pratik Naik
57b156b338
Dont use Memoizable for ActionController::Request
2009-01-27 17:26:37 +00:00
Joshua Peek
18cb0493d1
Refactor request urlencoded params parsing tests
2009-01-10 16:02:03 -06:00
Joshua Peek
92dbf5ba83
Refactor request multipart params parsing tests
2009-01-10 11:32:38 -06:00
Joshua Peek
40a75a5091
Refactor request xml params parsing tests
2009-01-09 16:05:27 -06:00
Joshua Peek
38a723e6ea
Refactor request json params parsing tests
2009-01-09 15:43:32 -06:00
Joshua Peek
282c1d6159
Refactor request query string parsing tests
2009-01-09 12:52:59 -06:00
Joshua Peek
f00e86d7e9
Memoize request accessors on the Rack env so other request objects have access to the same cache [ #1668 state:resolved]
2009-01-04 12:15:15 -06:00
Mark Reginald James
5138f755ff
Fixed incorrect parsing of query parameters with mixed-depth nesting inside an array [ #1622 state:resolved]
...
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com >
2008-12-28 01:15:48 +00:00
Pratik Naik
e898f82a74
Move request parsing related code to ActionController::RequestParser
2008-12-25 03:51:04 +00:00
Joshua Peek
9c1e48eaea
ActionController::VerbPiggybacking middleware
2008-12-23 13:36:05 -06:00
Pratik Naik
293bb02f91
Unify ActionController::AbstractRequest and ActionController::Request
2008-12-23 00:30:32 +00:00
Pratik Naik
7e1751111e
Rename RackRequest to Request
2008-12-23 00:30:32 +00:00
Joshua Peek
9c9da6c892
Boot out CGI Processor.
...
* Add ActionController::CGIHandler as a backwards compatible CGI wrapper around Rack.
* Also pull failsafe responder into ActionController::Failsafe middleware.
2008-12-04 20:39:36 -06:00
Darren Boyd
0a4a5f3129
Making the IP Spoofing check in AbstractRequest#remote_ip configurable.
...
Certain groups of web proxies do not set these values properly. Notably,
proxies for cell phones, which often do not set the remote IP information
correctly (not surprisingly, since the clients do not have an IP address).
Allowing this to be configurable makes it possible for developers to choose
to ignore this simple spoofing check, when a significant amount of their
traffic would result in false positives anyway.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1200 state:committed]
2008-12-01 20:40:18 +01:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Jeremy Kemper
eda9f49d57
Ruby 1.9 compat: CGI switched back to Tempfile
2008-11-08 22:43:29 -05:00
Jeremy Kemper
c82e8e1f48
Move controller assertions from base TestCase to AC:: and AV::TestCase
2008-11-07 15:42:34 -05:00
Michael S. Klishin
e42a235dd1
Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
...
[#523 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-27 23:03:11 -07:00
Joshua Peek
894f9ccc53
Use RackRequest as a mock instead of StubCGI into RequestTest
2008-08-17 19:04:01 -05:00
Jeremy Kemper
ba2d61dd81
Update tests for request memoization
2008-08-08 02:31:12 -07:00
Joshua Peek
a87462afcb
AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root
2008-07-24 13:41:51 -05:00
Michael Koziarski
2f4aaed7b3
Disable the Accept header by default
...
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
Mike Subelsky
8f640c381d
Added application/jsonrequest as a synonym for application/json
...
[#536 state:resolved]
2008-07-02 11:39:42 -07:00
David Heinemeier Hansson
edfa195e2a
Fixed Request#remote_ip to only raise hell if the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR doesnt match (not just if theyre both present) [Mark Imbriaco, Bradford Folkens]
2008-06-03 18:11:47 -05:00
Rick Olson
4d594cffcf
Automatically parse posted JSON content for Mime::JSON requests. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:05:54 +00:00
Jeremy Kemper
30fa377f33
Ruby 1.9 compat: encoding and multibyte test fixes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:04 +00:00
Jeremy Kemper
a61b63d420
Avoid remote_ip spoofing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9124 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:38:01 +00:00
David Heinemeier Hansson
388e5d3fac
Fixed that ActionController::Base#read_multipart would fail if boundary was exactly 10240 bytes ( closes #10886 ) [ariejan]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:55:31 +00:00
Rick Olson
1e0ac3a673
Fix more obscure nested parameter hash parsing bug. Closes #10797 [thomas.lee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 03:22:25 +00:00
Rick Olson
3a17ea9031
Fix nested parameter hash parsing bug. #10797 [thomas.lee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 07:46:39 +00:00
Rick Olson
8e6638afa4
Fix bug with setting Request#format= after the getter has cached the value. Closes #10889 [cch1]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 16:46:50 +00:00
Jeremy Kemper
9d755f1983
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
41c82e66c1
Ruby 1.9 compat: file uploads. References #1689 [Frederick Cheung]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-27 11:17:53 +00:00
Jeremy Kemper
f91acf0258
Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:14:07 +00:00
David Heinemeier Hansson
26e10218bc
Added OPTIONS to list of default accepted HTTP methods ( closes #10449 ) [holoway]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:06:24 +00:00
Jeremy Kemper
f85089aabb
Fixes for standalone tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:04 +00:00
Jeremy Kemper
db885e81b9
Ignore illegal seeks on body rewind. Catches CGI errors depending on your httpd. Closes #10404 [Curtis Hawthorne]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-07 04:20:20 +00:00
Rick Olson
0a9bc591e7
Raise UnknownHttpMethod exception for unknown HTTP methods. Closes #10303 [tarmo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-29 02:08:51 +00:00
Michael Koziarski
6d0e5eaf06
memoize host with port and refactor the tests which depend on it changing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-17 05:41:47 +00:00
David Heinemeier Hansson
31e2a2d9bb
Fixed handling of non-domain hosts ( closes #9479 ) [purp]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-07 14:57:51 +00:00
Jeremy Kemper
82314608b5
Factor Integration::Runner behavior out of IntegrationTest. Introduce Session#request_count which counts processed requests.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-01 07:59:24 +00:00
Jeremy Kemper
79670fb975
request.parameters doesn't overwrite request.request_parameters. Closes #9949 [nullstyle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-22 21:10:56 +00:00
Jeremy Kemper
52ca5dad1e
Use StringIO and Tempfile subclasses instead of defining singleton methods on each multipart field.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 11:40:13 +00:00
Jeremy Kemper
3405fb3dea
Rewind stdin if possible after multipart parsing.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 09:39:31 +00:00
Michael Koziarski
fe31f0e066
Add a user_agent to TestRequest
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-07 03:45:54 +00:00
David Heinemeier Hansson
937a7abe45
Fixed that file.content_type for uploaded files would include a trailing \r #9053 [bgreenlee]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-07-24 01:20:18 +00:00
Jeremy Kemper
a72fe4ea45
Give the legacy X-POST_DATA_FORMAT header greater precedence during params parsing for backward compatibility.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-26 01:19:18 +00:00
Jeremy Kemper
979c22444d
Tolerate missing content type on multipart file uploads. Fix for Safari 3.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7005 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-12 07:44:23 +00:00
Jeremy Kemper
e5b3d4b3b5
request.remote_ip understands X-Forwarded-For addresses with nonstandard whitespace. Closes #7386 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 00:10:13 +00:00
Jeremy Kemper
06f325f478
Add multipart request parsing test with bracketed parameter key. References #8449 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-24 23:37:37 +00:00