Christian Neukirchen [Sun, 18 Oct 2009 19:40:32 +0000 (21:40 +0200)]
Merge branch 'rack-1.0' of github.com:rack/rack into rack-1.0
Christian Neukirchen [Sun, 18 Oct 2009 19:39:16 +0000 (21:39 +0200)]
Update README for 1.0.1
Michael Fellinger [Tue, 30 Jun 2009 10:53:38 +0000 (19:53 +0900)]
Set correct external_encoding for handlers that don't use RewindableInput
Daniel Rodríguez Troitiño [Thu, 8 Oct 2009 06:51:11 +0000 (08:51 +0200)]
Fixes the handling of the filename parameter.
Uses the RE used by Ruby in cgi.rb, that handles
the embedded semicolons in the filename correctly.
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Daniel Rodríguez Troitiño [Thu, 8 Oct 2009 06:48:34 +0000 (08:48 +0200)]
Test multipart upload with a semicolon in the name.
Test a multipart upload in which the specified
filename includes a semicolon. Should be parsed
with the included filename, but Rack stops at the
filename.
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
dmann [Tue, 11 Aug 2009 20:56:50 +0000 (13:56 -0700)]
Checking that the FCGI::Stream class exists, before trying to override the read method. The FCGI::Stream class does not exist in the pure ruby version of the FCGI module. FCGI will use pure ruby if:
1. FCGI_PURE_RUBY = true
2. The C version of FCGI doesn't load (lib not found or the like)
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Masayoshi Takahashi [Wed, 24 Jun 2009 19:21:21 +0000 (03:21 +0800)]
use Rack::Utils::bytesize, not String#size for multibyte characters in Ruby1.9
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Hongli Lai (Phusion) [Wed, 17 Jun 2009 22:30:38 +0000 (17:30 -0500)]
Enforce binary encoding in RewindableInput; fixes Ruby 1.9 issues.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Michael Fellinger [Fri, 5 Jun 2009 11:39:17 +0000 (20:39 +0900)]
Make sure that Reloader doesn't break when executed via ruby -e
Michael Fellinger [Mon, 1 Jun 2009 05:41:04 +0000 (14:41 +0900)]
Make sure WEBrick respects the :Host option
raggi [Tue, 6 Oct 2009 14:30:54 +0000 (15:30 +0100)]
Revert "Relax Lint slightly to allow subclasses of the required types"
This reverts commit
663a4383a14ead49ef253e7d10b2e3cad45646a0.
raggi [Mon, 5 Oct 2009 21:53:28 +0000 (22:53 +0100)]
Relax Lint slightly to allow subclasses of the required types
Joshua Peek [Tue, 4 Aug 2009 03:33:24 +0000 (22:33 -0500)]
Kill stray debug line
Joshua Peek [Tue, 4 Aug 2009 03:21:15 +0000 (22:21 -0500)]
Use more compatible gzip write api instead of "<<".
Fixes undefined method `<<' for Zlib::GzipWriter on JRuby
Julien Sanchez [Mon, 3 Aug 2009 15:49:11 +0000 (10:49 -0500)]
Mongrel handler should use rack_input var
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Joshua Peek [Mon, 3 Aug 2009 15:33:18 +0000 (10:33 -0500)]
Return an empty string for Request#host if HTTP_HOST and SERVER_NAME are both missing
Joshua Peek [Mon, 3 Aug 2009 17:25:45 +0000 (12:25 -0500)]
Kill request instance memoization
Conflicts:
test/spec_rack_mock.rb
Joshua Peek [Fri, 1 May 2009 00:02:57 +0000 (19:02 -0500)]
Bump remainder of rack.versions
Ryan Tomayko [Sat, 25 Apr 2009 14:35:10 +0000 (07:35 -0700)]
fix rack.version in MockRequest
Hongli Lai (Phusion) [Wed, 17 Jun 2009 22:33:21 +0000 (17:33 -0500)]
Document more clearly that rack.input must be opened in binary mode, and enforce it in Rack::Lint.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Hongli Lai (Phusion) [Wed, 17 Jun 2009 22:19:19 +0000 (17:19 -0500)]
Add unit tests for Rack::Util::HeaderHash#delete. [#54 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
tlrobinson [Fri, 22 May 2009 22:46:01 +0000 (15:46 -0700)]
Fix for form names containing "=": split first then unescape components
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Simon Chiang [Fri, 15 May 2009 14:53:04 +0000 (22:53 +0800)]
optimizations of parse/build query
Signed-off-by: Joshua Peek <josh@joshpeek.com>
raggi [Tue, 28 Apr 2009 23:28:12 +0000 (00:28 +0100)]
Switch to emacs style encoding comment
raggi [Tue, 28 Apr 2009 23:15:53 +0000 (00:15 +0100)]
Fix multipart uploads on 1.9
Joshua Peek [Tue, 28 Apr 2009 16:43:22 +0000 (11:43 -0500)]
Add anchor to nested params parsing regexp to prevent stack overflows
Christian Neukirchen [Sat, 25 Apr 2009 13:12:41 +0000 (15:12 +0200)]
Java doesn't provide unlink(2) reliably
Christian Neukirchen [Sat, 25 Apr 2009 13:08:42 +0000 (15:08 +0200)]
Package rack.gemspec as well
Christian Neukirchen [Sat, 25 Apr 2009 13:03:54 +0000 (15:03 +0200)]
Last minute updates
Christian Neukirchen [Sat, 25 Apr 2009 12:42:36 +0000 (14:42 +0200)]
Merge commit 'FooBarWidget/master'
Christian Neukirchen [Sat, 25 Apr 2009 12:37:22 +0000 (14:37 +0200)]
Patch FCGI::Stream#read to use a buffer
Hongli Lai (Phusion) [Sat, 25 Apr 2009 11:02:33 +0000 (13:02 +0200)]
Explain the usefulness of the to_path method of the body.
Hongli Lai (Phusion) [Sat, 25 Apr 2009 10:47:18 +0000 (12:47 +0200)]
Fix styling the Rack specification.
Christian Neukirchen [Sat, 25 Apr 2009 10:38:53 +0000 (12:38 +0200)]
Merge commit 'official/master'
Christian Neukirchen [Sat, 25 Apr 2009 10:27:42 +0000 (12:27 +0200)]
Update README
Tim Carey-Smith [Sun, 19 Apr 2009 07:29:21 +0000 (19:29 +1200)]
Order URL maps by hostname first, putting "empty" first
When an aliasing server accepts a request on 1 of the alias
hostnames, the SERVER_NAME is set to the primary hostname but
the HTTP_HOST is set to the alias.
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Christian Neukirchen [Sat, 25 Apr 2009 10:06:22 +0000 (12:06 +0200)]
Remove redundant AUTHORS file
Joshua Peek [Fri, 24 Apr 2009 18:45:20 +0000 (13:45 -0500)]
Check for the existence of Rack in the load path.
Fixes issues with rubygems where you would get rack in the load path twice if you used gem and require.
Joshua Peek [Sun, 19 Apr 2009 00:54:37 +0000 (19:54 -0500)]
Merge commit 'FooBarWidget/master'
Joshua Peek [Sun, 19 Apr 2009 00:47:15 +0000 (19:47 -0500)]
Add 'rack.session' specification
Michael Fellinger [Fri, 17 Apr 2009 10:31:04 +0000 (19:31 +0900)]
ConditionalGet should delete Content-Type and Content-Length headers if they are set
Michael Fellinger [Thu, 16 Apr 2009 04:57:17 +0000 (13:57 +0900)]
Improved Rack::Reloader
Hongli Lai (Phusion) [Tue, 14 Apr 2009 22:32:29 +0000 (00:32 +0200)]
Optimize parse_multipart: put read data into a buffer in order to reduce garbage. This is allowed by the recent rack.input#read spec changes.
Hongli Lai (Phusion) [Tue, 14 Apr 2009 20:04:56 +0000 (22:04 +0200)]
Specify rack.input#read to behave the same like IO#read.
Hongli Lai (Phusion) [Tue, 14 Apr 2009 19:47:30 +0000 (21:47 +0200)]
Implement a Rack::RewindableInput utility class, for making any IO object rewindable.
Useful for handler implementers who want an easy way to make their rack.input rewindable.
Hongli Lai (Phusion) [Tue, 14 Apr 2009 17:38:18 +0000 (19:38 +0200)]
Remove code for handling the possibility that rack.input may not be rewindable, because rack.input is now required to be rewindable.
Hongli Lai (Phusion) [Tue, 14 Apr 2009 17:17:57 +0000 (19:17 +0200)]
Update Rack specification: require rack.input to be rewindable.
Hongli Lai (Phusion) [Tue, 14 Apr 2009 17:37:14 +0000 (19:37 +0200)]
Describe some things in the specification more clearly, and add some minor styling improvements.
Christian Neukirchen [Tue, 14 Apr 2009 10:09:09 +0000 (12:09 +0200)]
Rack::Request#write: count length with bytesize
Christian Neukirchen [Sat, 11 Apr 2009 09:56:42 +0000 (11:56 +0200)]
Add #rewind noop for FastCGI
eTM [Sat, 11 Apr 2009 02:52:07 +0000 (04:52 +0200)]
better multipart handling
Christian Neukirchen [Fri, 10 Apr 2009 11:41:16 +0000 (13:41 +0200)]
Simplify Rakefile
Christian Neukirchen [Fri, 10 Apr 2009 11:37:19 +0000 (13:37 +0200)]
Remove deprecated rdoc flag
Christian Neukirchen [Fri, 10 Apr 2009 11:33:27 +0000 (13:33 +0200)]
Fix dist task dependencies
Christian Neukirchen [Fri, 10 Apr 2009 11:31:48 +0000 (13:31 +0200)]
Fix gem task dependencies
Michael Fellinger [Mon, 30 Mar 2009 01:32:28 +0000 (10:32 +0900)]
Allow arbitrary number of arguments for Request::new
Michael Fellinger [Tue, 31 Mar 2009 03:13:49 +0000 (12:13 +0900)]
Make sure the correct rack is required in rackup
Rob [Wed, 18 Mar 2009 11:28:41 +0000 (11:28 +0000)]
Added extra nested params error handling and added messages to exceptions to help with debugging
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
Michael Fellinger [Tue, 17 Mar 2009 17:01:29 +0000 (02:01 +0900)]
Refactor Handler::get and add Handler::try_require
Graham Batty [Thu, 26 Feb 2009 23:51:56 +0000 (16:51 -0700)]
Simplified options for unregistered handlers
Made it so that it only accepts FullyCapsedClassNames for unregistered handlers as per suggestions in #rack irc channel.
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
Graham Batty [Thu, 26 Feb 2009 23:23:56 +0000 (16:23 -0700)]
Made it so that the expectation is that Handler.get raises NameError on failure instead of nil under the principle of obvious failure.
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
Graham Batty [Thu, 26 Feb 2009 22:36:57 +0000 (15:36 -0700)]
Made auto-registration of unknown handlers much smarter. This should make it possible for the responsibility for handler definition to be on the people writing servers without making life difficult for the user. ie. 'gem install thin', if thin includes its rack adapter, would make 'rackup -s thin' just work, which is how it should be.
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
Christian Neukirchen [Wed, 25 Mar 2009 13:49:04 +0000 (14:49 +0100)]
Document version change
Christian Neukirchen [Wed, 25 Mar 2009 13:41:36 +0000 (14:41 +0100)]
Push version numbers
Christian Neukirchen [Wed, 25 Mar 2009 13:36:47 +0000 (14:36 +0100)]
Ensure to rebuild rdocs
Christian Neukirchen [Wed, 25 Mar 2009 13:36:29 +0000 (14:36 +0100)]
Update copyright years
Christian Neukirchen [Wed, 25 Mar 2009 13:34:10 +0000 (14:34 +0100)]
Add Rack::Response#redirect
Christian Neukirchen [Wed, 25 Mar 2009 13:27:40 +0000 (14:27 +0100)]
Document SPEC changes, officially deprecate String bodies
Christian Neukirchen [Wed, 25 Mar 2009 13:14:36 +0000 (14:14 +0100)]
SPEC: Clarify percent-encoding of PATH_INFO
Christian Neukirchen [Wed, 25 Mar 2009 13:12:36 +0000 (14:12 +0100)]
Revert "Specify PATH_INFO encoding"
This reverts commit
7a3d21f4b469d5ce9d1ee4d952c806064f4dfbcf.
Christian Neukirchen [Wed, 25 Mar 2009 12:50:12 +0000 (13:50 +0100)]
Build all files needed
Christian Neukirchen [Wed, 25 Mar 2009 12:45:23 +0000 (13:45 +0100)]
Refactor Rakefile
TJ Holowaychuk [Wed, 18 Mar 2009 23:54:15 +0000 (16:54 -0700)]
Added Rack::Request#path
I would imagine since its used internally there is a chance other devs will
need it, and IMO its a mise-well situation, your call :)
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
TJ Holowaychuk [Wed, 18 Mar 2009 23:33:58 +0000 (16:33 -0700)]
Refactored Rack::Request#media_type
No need for subscript, first reads better
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Christian Neukirchen [Thu, 12 Mar 2009 00:35:06 +0000 (01:35 +0100)]
Don't evaluate CGI ISINDEX parameters in rackup
Ryan Tomayko [Fri, 13 Mar 2009 16:57:02 +0000 (09:57 -0700)]
Rack::Deflater streaming
Rob [Fri, 13 Mar 2009 18:17:09 +0000 (13:17 -0500)]
Remove files from params when no file is selected [#37 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Michael Fellinger [Fri, 13 Mar 2009 14:37:00 +0000 (23:37 +0900)]
Rack::File should use Utils::bytesize
Michael Fellinger [Thu, 12 Mar 2009 11:41:56 +0000 (20:41 +0900)]
Add URLMap#remap and make the initialize parameter optional
Ryan Tomayko [Fri, 6 Mar 2009 05:21:52 +0000 (21:21 -0800)]
Handlers use ContentLength and Chunked middleware where needed
Each Rack handler now automatically wraps the app in one or more
pieces of middleware based on how the server is implemented. All
handlers use the Rack::ContentLength middleware and some handlers
use the Rack::Chunked middleware. Handlers that don't use the
Chunked middleware either do not require CE for some reason or
implement CE at the server level.
* The Thin handler uses Chunked and ContentLength middleware. Thin
has built-in CE support but also allows the app to apply it
explicitly. Using our middleware for consistency and also because
I believe the Thin folks want to remove CE support in the future.
* The Mongrel handler uses Chunked and ContentLength middleware.
Mongrel has built-in CE support but also allows the app to apply
it explicitly. Using our middleware for consistency across
handlers.
* The SCGI handler uses Chunked and ContentLength middleware.
* The WEBrick handler uses ContentLength middleware only; WEBrick
has a really touchy CE implementation that doesn't like it when
CE is applied by the application.
* The FastCGI handler uses ContentLength only. FastCGI has its own
mechanism for transferring bodies that do not include an
explicit Content-Length. The FastCGI server applies the chunked
encoding if needed.
* The CGI handler uses ContentLength only. The CGI spec forbids the
use of the Transfer-Encoding header in output from CGI programs.
The server program is responsible for applying the chunked
encoding if needed. Closing stdout signals the end of the body
so it's not really needed anyway.
* The LSWS handler uses ContentLength middleware only. Like CGI, LSWS
closes the stream after transfer so chunked encoding is never
required.
Ryan Tomayko [Fri, 6 Mar 2009 05:20:58 +0000 (21:20 -0800)]
Rack::Lint no longer requires a Content-Length response header
Ryan Tomayko [Fri, 6 Mar 2009 05:20:17 +0000 (21:20 -0800)]
Add Rack::Chunked (Transfer-Encoding: chunked) middleware
Russ Smith [Wed, 11 Mar 2009 17:46:07 +0000 (12:46 -0500)]
Force Litespeed input to be a proper IO object [#36 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Ryan Tomayko [Fri, 6 Mar 2009 05:19:23 +0000 (21:19 -0800)]
Add Rack::Utils.bytesize function, use everywhere
Sam Roberts [Sun, 8 Mar 2009 21:37:01 +0000 (22:37 +0100)]
Specify PATH_INFO encoding
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Simon Chiang [Sun, 8 Mar 2009 07:07:40 +0000 (00:07 -0700)]
WEBrick handler now sets the unescaped PATH_INFO
Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Brian Candler [Thu, 5 Mar 2009 13:17:42 +0000 (13:17 +0000)]
Add Rack::ContentType middleware
Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
candlerb [Wed, 4 Mar 2009 14:32:47 +0000 (06:32 -0800)]
Quick Rack::Builder code simplification
Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
Brian Candler [Thu, 26 Feb 2009 17:06:24 +0000 (17:06 +0000)]
Allow realm to be passed to auth handler's initialize method
Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
yonghui [Wed, 25 Feb 2009 17:22:38 +0000 (09:22 -0800)]
Use / suffix in text and URLs in directory listing
Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
S. Brent Faulkner [Thu, 5 Feb 2009 04:38:32 +0000 (23:38 -0500)]
Make MethodOverride + Auth::Digest play well together
Auth::Digest::Request#method now uses any value in
rack.methodoverride.original_method to override the value in
REQUEST_METHOD
Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
Michael Fellinger [Mon, 19 Jan 2009 05:33:45 +0000 (14:33 +0900)]
Add Response#length and Response#length=
Joshua Peek [Sun, 15 Feb 2009 00:10:38 +0000 (18:10 -0600)]
Split parse_query utility into parse_query and parse_nested_query. parse_nested_query now chooses the last value instead of returning an array of all of them.
Joshua Peek [Wed, 11 Feb 2009 00:30:49 +0000 (18:30 -0600)]
Revert "Don't clobber nested parameter values. Fixes checkboxes in nested forms."
This reverts commit
94a08fe93e785f34520d31fc2413d31bc211416d.
Joshua Peek [Tue, 10 Feb 2009 19:13:37 +0000 (13:13 -0600)]
Don't clobber nested parameter values. Fixes checkboxes in nested forms.
Scytrin dai Kinthra [Mon, 9 Feb 2009 04:57:59 +0000 (20:57 -0800)]
Fix of Auth::Abstract::Handler to return headers within spec.
401 and 400 responses must have Content-Type and Content-Length defined.
Ryan Tomayko [Tue, 9 Dec 2008 01:29:56 +0000 (17:29 -0800)]
Add body.to_path to SPEC; implement in Rack::File
Rack::File responds to #to_path. Rack::Lint checks that the files
given in #to_path exist and will WARN on rack.errors if not.
Ryan Tomayko [Tue, 3 Feb 2009 23:19:16 +0000 (15:19 -0800)]
Fix spec failures in Utils::parse_multipart under 1.9
File.read assumes that the file is encoded with default external
encoding. This was causing a regexp match failure because the String
was UTF-8 while the Regexp was binary. Opening the file with a
binary mode and slurping corrects the issue.
Ryan Tomayko [Tue, 3 Feb 2009 22:39:22 +0000 (14:39 -0800)]
Fix spec failures in Rack::Deflator under 1.9
There were two issues here that
* String#length was used to determine the Content-Length
resulting in off-by-one failures in expected length
assertions.
* The specs were using body.to_s to convert bodies to Strings.
In Ruby 1.8, #to_s is like #join; in Ruby 1.9, #to_s is like
#inspect
Ryan Tomayko [Mon, 2 Feb 2009 11:18:42 +0000 (03:18 -0800)]
Fix spec failures and warnings in Rack::Lock under 1.9