Commit Graph

50 Commits

Author SHA1 Message Date
Jeremy Kemper
8a1f913381 Workaround lack of Mocha on 1.9 (hasn't been updated for minitest yet) 2008-11-08 22:35:30 -05:00
Jeremy Kemper
ba2d61dd81 Update tests for request memoization 2008-08-08 02:31:12 -07:00
Tarmo Tänav
656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
Pratik Naik
2a7aca8ec3 Improve rack/cgi tests 2008-07-16 05:07:34 +01:00
Pratik Naik
1d002f6bcb Make RackRequest#request_method respect _method 2008-07-16 05:02:29 +01:00
Pratik Naik
89eec91e67 Add tests for CgiRequest#content_type 2008-07-16 03:31:45 +01:00
Joshua Peek
aff2d33172 Improved test coverage and added RackRequest support for CGI environment variables. 2008-07-01 21:53:55 -05:00
Joshua Peek
d5539958a8 Wrap CGIResponse, LegacyRouteSet, Route, RouteSet and RouteLoading tests inside mocha block. 2008-06-07 23:42:05 -05:00
Ezra Zygmuntowicz
06cb20708b Added Rack processor
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-06-01 11:25:11 -07:00
Jeremy Kemper
b84a33ddd1 Don't split cookies on comma also. References r8505.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:55:44 +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
11dde5ca2f Ruby 1.9 compat: cookies
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:28:53 +00:00
David Heinemeier Hansson
9a8d583a91 Fixed that ActionController::CgiRequest#host_with_port() should handle standard port (closes #10082) [moro]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-06 16:36:10 +00:00
Jeremy Kemper
33e5e41dda request.host works with IPv6 addresses. Closes #9458.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-31 19:03:42 +00:00
Jeremy Kemper
9159489872 Don't mistakenly interpret the request uri as the query string. Closes #8731.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-23 00:13:40 +00:00
Jeremy Kemper
b0d01921d8 Rewind request body after reading it, if possible. Closes #8438.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-23 05:43:00 +00:00
Jeremy Kemper
055ff9f418 Fix incorrent content type lookup in request parsing. Closes #8407.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-19 21:34:36 +00:00
Jeremy Kemper
d2ed32d592 Parse url-encoded and multipart requests ourselves instead of delegating to CGI.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 06:24:50 +00:00
Jeremy Kemper
f73e1c2ec0 Move request parameter parsing from CGI to AbstractRequest.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-15 22:10:03 +00:00
Jeremy Kemper
f8273e4309 Shine some sunlight on the CGI extensions. Remove unused CGI#session.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-15 00:08:05 +00:00
David Heinemeier Hansson
6a85955642 Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-25 17:25:44 +00:00
Nicholas Seckar
17a9405b58 Change the query parser to map empty GET params to "" rather than nil. Closes #5694.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 17:00:17 +00:00
Jeremy Kemper
41198ad3ad Fix parsing of array[] CGI parameters so extra empty values aren't included. Closes #6252.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 09:10:58 +00:00
Jeremy Kemper
0342393b30 Multipart form values may have a content type without being treated as uploaded files if they do not provide a filename. Closes #6401.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-09 18:52:19 +00:00
Jeremy Kemper
7661c2b50a Skip params with empty names, such as the &=Save query string from <input type=submit/>. Closes #2569.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-12 20:57:09 +00:00
Nicholas Seckar
d34a346d9d Switch to using FormEncodedPairParser for parsing request parameters.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-30 05:50:02 +00:00
David Heinemeier Hansson
d164d09649 FormEncodedStringParser needs a tad more work before it can handle POST data (like file handling), so were backing out for a bit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-28 14:05:05 +00:00
David Heinemeier Hansson
7b34d0f8c5 Actually, indifferent access mattered in the bowels (hashes hidden in arrays)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4823 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-26 03:09:32 +00:00
David Heinemeier Hansson
a78519071c Result is made indifferent on the way out
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-26 02:58:55 +00:00
David Heinemeier Hansson
04fda65306 Changed the POST parameter processing to use the new QueryStringParser and make the result a indifferent hash [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-26 02:49:09 +00:00
David Heinemeier Hansson
9e054fdf41 More tests for array/hashing in parameters, one failing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-26 01:57:44 +00:00
David Heinemeier Hansson
2d6ca64c45 Make us pass to ease RESTful children posts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-04 00:45:09 +00:00
David Heinemeier Hansson
6e842f216c Make us pass to ease RESTful children posts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-04 00:15:09 +00:00
Jeremy Kemper
8cdf9126d3 Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). Closes #210.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4410 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 06:30:23 +00:00
Jeremy Kemper
ce99c87551 Cope with missing content type and length headers. Parse parameters from multipart and urlencoded request bodies only. Accept multipart PUT parameters. Closes #5235.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 00:01:48 +00:00
Michael Koziarski
d153525c53 Fix NoMethodError when parsing params like &&. [Adam Greenfield]. Closes #4955
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-16 20:56:41 +00:00
David Heinemeier Hansson
4e15bf787e Fixed proxy support for lighttpd (closes #3267) [stephen_purcell@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 04:16:08 +00:00
Michael Koziarski
302533b196 Add support for multiple proxy servers in HTTP_X_FORWARDED_HOST. Closes #3397
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-13 08:31:16 +00:00
Jeremy Kemper
08fd13d17c Handle cookie parsing irregularity for certain Nokia phones. Closes #2530.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-15 07:51:09 +00:00
Nicholas Seckar
e0e8f0a302 Fix Request#host_with_port to use the standard port when Rails is behind a proxy.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 01:00:25 +00:00
Jeremy Kemper
5d19fd7841 Unit tests and fixtures for multipart posts.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 08:19:26 +00:00
Jeremy Kemper
17d2732b1c Ticket #2295 - Tolerate consecutive delimiters in query parameters
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-27 22:23:37 +00:00
Jeremy Kemper
9852197f83 r3573@asus: jeremy | 2005-09-26 11:38:44 -0700
Ticket 1507 - IE file uploads give the filename as a full Windows path, but Ruby on UNIX doesn't know how to File.basename('C:\\blah\blah.foo').
 r3574@asus:  jeremy | 2005-09-26 14:32:11 -0700
 Get rid of constant redefine warning.
 r3575@asus:  jeremy | 2005-09-26 14:33:07 -0700
 Override the file upload's original_filename singleton method in CGIMethods.get_typed_value.
 r3576@asus:  jeremy | 2005-09-26 14:33:49 -0700
 Unit test overridden original_filename against normal filenames and full Windows paths.
 r3577@asus:  jeremy | 2005-09-26 14:33:57 -0700
 Update change log.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-26 17:59:46 +00:00
David Heinemeier Hansson
128e352614 Fixed that hashes was not working properly when passed by GET to lighttpd #849 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 19:21:48 +00:00
Jamis Buck
fcdcd9b9fa Hashes sent via multipart post should be converted to strings #1032 [me@julik.nl]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 15:31:37 +00:00
David Heinemeier Hansson
a895be0259 Fixed query parser to deal gracefully with equal signs inside keys and values #1345 [gorou]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-16 06:42:49 +00:00
Jamis Buck
f6ec9e3d66 Arrays sent via multipart posts are converted to strings #1032 [dj@omelia.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 12:21:25 +00:00
David Heinemeier Hansson
68dfe3e046 Clean up load paths to avoid unit test interaction #1113 [alles@atomicobject.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-17 06:16:00 +00:00
David Heinemeier Hansson
50f333b203 Added graceful handling of non-alphanumeric names and misplaced brackets in input parameters [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@39 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:57:16 +00:00
David Heinemeier Hansson
db045dbbf6 Initial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00