rack
16 years agoTrim IE's full file path in multipart uploads rack-0.9
Joshua Peek [Thu, 15 Jan 2009 20:37:38 +0000 (14:37 -0600)]
Trim IE's full file path in multipart uploads

16 years agoFix multipart parsing of binary content in UTF8 mode
Jonathan del Strother [Fri, 16 Jan 2009 16:53:00 +0000 (16:53 +0000)]
Fix multipart parsing of binary content in UTF8 mode

The boundary regexp should use the 'n' multibyte switch to disable multibyte processing on the multipart content bodies.

16 years agoAdd multipart tests for input that does not support rewinding
Joshua Peek [Thu, 15 Jan 2009 06:16:40 +0000 (00:16 -0600)]
Add multipart tests for input that does not support rewinding

16 years agoAdd multipart test with binary file
Joshua Peek [Thu, 15 Jan 2009 06:10:54 +0000 (00:10 -0600)]
Add multipart test with binary file

16 years agoAdd tests for multipart uploads. Also ensure multipart parser tries to rewind the...
Joshua Peek [Wed, 14 Jan 2009 00:21:51 +0000 (18:21 -0600)]
Add tests for multipart uploads. Also ensure multipart parser tries to rewind the input stream.

16 years agoFix directory traversal exploits in Rack::File and Rack::Directory 0.9.1
Christian Neukirchen [Fri, 9 Jan 2009 16:32:54 +0000 (17:32 +0100)]
Fix directory traversal exploits in Rack::File and Rack::Directory

16 years agoLast minute README fixes 0.9
Christian Neukirchen [Tue, 6 Jan 2009 11:56:00 +0000 (12:56 +0100)]
Last minute README fixes

16 years agoFix last glitches
Christian Neukirchen [Tue, 6 Jan 2009 11:46:37 +0000 (12:46 +0100)]
Fix last glitches

16 years agoSet release date
Christian Neukirchen [Tue, 6 Jan 2009 11:44:44 +0000 (12:44 +0100)]
Set release date

16 years agoStore original HTTP method in MethodOverride middleware
Jon Crosby [Tue, 6 Jan 2009 01:44:36 +0000 (17:44 -0800)]
Store original HTTP method in MethodOverride middleware

16 years agoFix typos in auth/openid
Christian Neukirchen [Tue, 6 Jan 2009 11:30:29 +0000 (12:30 +0100)]
Fix typos in auth/openid
Reported by Robert Adkins <radkins@technetra.com>

16 years agoRack::File::MIME_TYPES is now Rack::Mime::MIME_TYPES
Christian Neukirchen [Mon, 5 Jan 2009 17:41:15 +0000 (18:41 +0100)]
Rack::File::MIME_TYPES is now Rack::Mime::MIME_TYPES

16 years agoUpdate gemspec
Christian Neukirchen [Mon, 5 Jan 2009 17:35:31 +0000 (18:35 +0100)]
Update gemspec

16 years agoRevert "Added Rack::Request initialization memoization to reduce repetitive instantia...
Christian Neukirchen [Mon, 5 Jan 2009 17:46:08 +0000 (18:46 +0100)]
Revert "Added Rack::Request initialization memoization to reduce repetitive instantiation cost."
Potentially causes problems with inheritance.

This reverts commits:
4cf6f6eb0dd8fdb415016a4e2f41d1784146cd7a
552f7b0718ee8cd79c185cd72413690f0da72402
eefbed89c4ece749e889132012d0f67cd87926a8

16 years agoBranch 0.9
Christian Neukirchen [Mon, 5 Jan 2009 17:42:09 +0000 (18:42 +0100)]
Branch 0.9

16 years agoUpdate thanks
Christian Neukirchen [Mon, 5 Jan 2009 17:16:36 +0000 (18:16 +0100)]
Update thanks

16 years agoUpdate copyright
Christian Neukirchen [Mon, 5 Jan 2009 17:16:24 +0000 (18:16 +0100)]
Update copyright

16 years agoUpdate README
Christian Neukirchen [Mon, 5 Jan 2009 17:06:11 +0000 (18:06 +0100)]
Update README

16 years agoIn URLMap, entries without host name should come first
Christian Neukirchen [Mon, 5 Jan 2009 14:00:15 +0000 (15:00 +0100)]
In URLMap, entries without host name should come first

16 years agoMarshall of String changed in 1.9
Christian Neukirchen [Mon, 5 Jan 2009 13:59:38 +0000 (14:59 +0100)]
Marshall of String changed in 1.9

16 years agoRewrite Response test to use a well-defined #each
Christian Neukirchen [Mon, 5 Jan 2009 13:59:27 +0000 (14:59 +0100)]
Rewrite Response test to use a well-defined #each

16 years agoArray#to_a changed in 1.9
Christian Neukirchen [Mon, 5 Jan 2009 13:59:06 +0000 (14:59 +0100)]
Array#to_a changed in 1.9

16 years agoConstants are symbols in 1.9
Christian Neukirchen [Mon, 5 Jan 2009 13:58:45 +0000 (14:58 +0100)]
Constants are symbols in 1.9

16 years agoShuffle scopes for 1.9
Christian Neukirchen [Mon, 5 Jan 2009 12:51:20 +0000 (13:51 +0100)]
Shuffle scopes for 1.9

16 years agoFix spec_rack_response for 1.9
raggi [Mon, 5 Jan 2009 09:41:13 +0000 (05:41 -0400)]
Fix spec_rack_response for 1.9

16 years agoFix webrick handler for ruby 1.9.1
Michael Fellinger [Sun, 4 Jan 2009 14:19:31 +0000 (23:19 +0900)]
Fix webrick handler for ruby 1.9.1

16 years agoMerge commit 'official/master'
Christian Neukirchen [Tue, 30 Dec 2008 21:03:42 +0000 (22:03 +0100)]
Merge commit 'official/master'

16 years agoAdd trailing slash to the alternative gem server
Christian Neukirchen [Tue, 30 Dec 2008 20:48:17 +0000 (21:48 +0100)]
Add trailing slash to the alternative gem server

16 years agoSupport X-Http-Method-Override header in MethodOverride middleware
Joshua Peek [Tue, 30 Dec 2008 04:31:27 +0000 (22:31 -0600)]
Support X-Http-Method-Override header in MethodOverride middleware

16 years agoDon't leak absolute paths in error messages
Christian Neukirchen [Tue, 30 Dec 2008 11:23:26 +0000 (12:23 +0100)]
Don't leak absolute paths in error messages
Reported by Yonghui Luo.

16 years agoImplement HeaderHash#merge! and HeaderHash#merge
Ryan Tomayko [Mon, 29 Dec 2008 10:15:25 +0000 (02:15 -0800)]
Implement HeaderHash#merge! and HeaderHash#merge

16 years agoUse HeaderHash where header case should be insensitive
Ryan Tomayko [Mon, 29 Dec 2008 08:40:46 +0000 (00:40 -0800)]
Use HeaderHash where header case should be insensitive

The ConditionalGet, ContentLength, Deflator, and ShowStatus
middleware components were reading/checking headers case
sensitively.

16 years agoNon-normalizing HeaderHash with case-insensitive lookups
Ryan Tomayko [Fri, 12 Dec 2008 05:00:27 +0000 (21:00 -0800)]
Non-normalizing HeaderHash with case-insensitive lookups

This is a backwards incompatible change that removes header name
normalization while attempting to keep most of its benefits. The
header name case is preserved but the Hash has case insensitive
lookup, replace, delete, and include semantics.

16 years agoDon't try to rewind CGI input
Joshua Peek [Mon, 29 Dec 2008 17:49:29 +0000 (11:49 -0600)]
Don't try to rewind CGI input

16 years agoReformat Rack::Deflater code
Christian Neukirchen [Sun, 28 Dec 2008 13:08:47 +0000 (14:08 +0100)]
Reformat Rack::Deflater code

16 years agoRack::Deflator respects the no-transform cache control directive
Ryan Tomayko [Tue, 23 Dec 2008 08:23:49 +0000 (00:23 -0800)]
Rack::Deflator respects the no-transform cache control directive

16 years agoUpdate README
Christian Neukirchen [Thu, 25 Dec 2008 11:20:50 +0000 (12:20 +0100)]
Update README

16 years agoIdiomize code
Christian Neukirchen [Thu, 25 Dec 2008 11:09:42 +0000 (12:09 +0100)]
Idiomize code

16 years agoAdded specification for Rack::Request memoization.
Matt Todd [Thu, 25 Dec 2008 00:33:17 +0000 (19:33 -0500)]
Added specification for Rack::Request memoization.

16 years agoUpdated spec with the new size of the content length based on the new environment...
Matt Todd [Thu, 25 Dec 2008 00:25:20 +0000 (19:25 -0500)]
Updated spec with the new size of the content length based on the new environment variable data included with the Rack::Request instantiation memoization.

16 years agoAdded Rack::Request initialization memoization to reduce repetitive instantiation...
Matt Todd [Thu, 25 Dec 2008 00:24:44 +0000 (19:24 -0500)]
Added Rack::Request initialization memoization to reduce repetitive instantiation cost.

16 years agoRewind input after parsing request form vars
Joshua Peek [Wed, 24 Dec 2008 03:32:38 +0000 (21:32 -0600)]
Rewind input after parsing request form vars

16 years agoDelegate Lint::InputWrapper#rewind to underlying IO object
Joshua Peek [Wed, 24 Dec 2008 03:22:50 +0000 (21:22 -0600)]
Delegate Lint::InputWrapper#rewind to underlying IO object

16 years agouse Set instead of Array for STATUS_WITH_NO_ENTITY_BODY
Ryan Tomayko [Tue, 23 Dec 2008 19:52:11 +0000 (11:52 -0800)]
use Set instead of Array for STATUS_WITH_NO_ENTITY_BODY

16 years agoRack::ContentLength tweaks ...
Ryan Tomayko [Tue, 23 Dec 2008 06:17:18 +0000 (22:17 -0800)]
Rack::ContentLength tweaks ...

 * Adds a Content-Length header only when the body is of knownable
   length (String, Array).
 * Does nothing when Transfer-Encoding header is present in
   response.
 * Uses a Set instead of an Array for status code lookup (linear
   search through 102 elements seemed expensive).

16 years agoFixed Rack::Deflater to handle responses with Last-Modified header
Dan Kubb [Sat, 20 Dec 2008 21:36:22 +0000 (13:36 -0800)]
Fixed Rack::Deflater to handle responses with Last-Modified header

* There was a bug when performing gzip compression where the
  Last-Modified response header was assumed to be a Time object,
  and passed directly to Zlib::GzipWriter#mtime, causing an exception
  since it is always a String.

  This fix parses the Last-Modified header using Time.httpdate and
  returns a Time obejct, which can be safely passed to
  Zlib::GzipWriter#mtime.

16 years agoDo not add Content-Encoding for a response without and entity body
Dan Kubb [Sat, 20 Dec 2008 21:23:05 +0000 (13:23 -0800)]
Do not add Content-Encoding for a response without and entity body

16 years agoUpdated Rack::Deflater spec helper to allow setting the default status
Dan Kubb [Sat, 20 Dec 2008 21:17:18 +0000 (13:17 -0800)]
Updated Rack::Deflater spec helper to allow setting the default status

16 years agoMoved STATUS_WITH_NO_ENTITY_BODY into Rack::Utils
Dan Kubb [Sat, 20 Dec 2008 21:06:28 +0000 (13:06 -0800)]
Moved STATUS_WITH_NO_ENTITY_BODY into Rack::Utils

* Removed duplicate constant from Rack::ContentLength and Rack::Lint

16 years agoAdded Accept-Encoding to HTTP Vary header
Dan Kubb [Sat, 20 Dec 2008 21:00:58 +0000 (13:00 -0800)]
Added Accept-Encoding to HTTP Vary header

16 years agoMerge commit 'rtomayko/methodoverride'
Christian Neukirchen [Fri, 19 Dec 2008 14:24:21 +0000 (15:24 +0100)]
Merge commit 'rtomayko/methodoverride'

16 years agoFix MethodOverride error when POST has no _method param
Ryan Tomayko [Fri, 19 Dec 2008 03:25:24 +0000 (19:25 -0800)]
Fix MethodOverride error when POST has no _method param

16 years agoAdd autoload for Thin handler
macournoyer [Wed, 17 Dec 2008 15:02:15 +0000 (10:02 -0500)]
Add autoload for Thin handler

16 years agoAdd Thin handler
macournoyer [Wed, 17 Dec 2008 02:48:21 +0000 (21:48 -0500)]
Add Thin handler

16 years agoAdd ContentLength middleware
Joshua Peek [Tue, 9 Dec 2008 16:34:19 +0000 (10:34 -0600)]
Add ContentLength middleware

16 years agofixing camping bug. see gist:26011
kastner [Tue, 2 Dec 2008 05:24:23 +0000 (22:24 -0700)]
fixing camping bug. see gist:26011

16 years agoCorrect status code language to follow RFC 2616
Joshua Peek [Tue, 2 Dec 2008 17:28:49 +0000 (11:28 -0600)]
Correct status code language to follow RFC 2616

16 years agoImprove session id security: Make session id size configurable, raise the default...
Daniel Roethlisberger [Wed, 19 Nov 2008 21:07:38 +0000 (22:07 +0100)]
Improve session id security: Make session id size configurable, raise the default size from 32 bits to 128 bits, and refactor to allow for easy monkey patching the actual session id generation. Modified version according to feedback.

16 years agoAdd support for Secure and HttpOnly flags to session cookies. Set HttpOnly flag by...
Daniel Roethlisberger [Wed, 19 Nov 2008 21:23:30 +0000 (22:23 +0100)]
Add support for Secure and HttpOnly flags to session cookies. Set HttpOnly flag by default, since normally, there is no need to read a Rack session from JavaScript in the browser. Do not set the Secure flag by default, since that breaks if the application is not served over TLS.

16 years agoAvoid slurping or parsing request body on PUT requests
Eric Wong [Fri, 17 Oct 2008 18:43:25 +0000 (11:43 -0700)]
Avoid slurping or parsing request body on PUT requests

Uploading a large file via the HTTP PUT method causes
`@env["rack.input"].read' to be called inside the POST method.  This
means the entire file is slurped into memory and was needlessly causing
my Sinatra process to eat up 300M+ for some uploads I've been doing.

16 years agoUse the universally supported select event handler for lighttpd.
postmodern [Thu, 20 Nov 2008 22:49:32 +0000 (14:49 -0800)]
Use the universally supported select event handler for lighttpd.

* freebsd-kqueue is obviously not supported on Linux.

16 years agoWhen calling map, create another object of the same class.
postmodern [Thu, 20 Nov 2008 08:14:21 +0000 (00:14 -0800)]
When calling map, create another object of the same class.

* This allows one to extend Rack::Builder to create specialized Rack
  DSLs.

16 years agoSilence Net::HTTP warning
Christian Neukirchen [Fri, 28 Nov 2008 14:51:48 +0000 (15:51 +0100)]
Silence Net::HTTP warning

16 years agoUpdated the tests to use net/http since open-uri doesn't stream responses.
Phil Hagelberg [Wed, 26 Nov 2008 00:33:27 +0000 (16:33 -0800)]
Updated the tests to use net/http since open-uri doesn't stream responses.

Oh, and now the tests actually pass.

16 years agoAllow streaming with the Mongrel Handler.
Phil Hagelberg [Wed, 26 Nov 2008 00:16:39 +0000 (16:16 -0800)]
Allow streaming with the Mongrel Handler.

Write directly to the socket instead of keeping it in the Mongrel Response body.
Send the status/headers up front.

16 years agoAdd tests for streaming with Mongrel.
Phil Hagelberg [Tue, 25 Nov 2008 23:29:24 +0000 (15:29 -0800)]
Add tests for streaming with Mongrel.

16 years agoImplemented Rack::Head, modified Rack::Lint to ensure responses to HEAD requests...
Ben Alpert [Sun, 19 Oct 2008 06:15:49 +0000 (00:15 -0600)]
Implemented Rack::Head, modified Rack::Lint to ensure responses to HEAD requests have empty bodies

16 years agoFix header emission for WEBrick and Set-Cookie
Christian Neukirchen [Sat, 11 Oct 2008 14:45:41 +0000 (16:45 +0200)]
Fix header emission for WEBrick and Set-Cookie
Found by Michael Fellinger.
This does not fix Set-Cookie2, Warning, or WWW-Authenticate, because
WEBrick has no way to have duplicates for them.

16 years agoTest that Rack::Session::Cookie ignores tampered with session cookies
Christian Neukirchen [Wed, 1 Oct 2008 10:10:40 +0000 (12:10 +0200)]
Test that Rack::Session::Cookie ignores tampered with session cookies
by Christoffer Sawicki

16 years agoAdd secure cookies
Christian Neukirchen [Tue, 30 Sep 2008 17:18:35 +0000 (19:18 +0200)]
Add secure cookies
Proposed by necrodome.

16 years agoEmpty is if Content-Length is 0, [''] ain't empty?
Michael Fellinger [Tue, 30 Sep 2008 08:25:29 +0000 (17:25 +0900)]
Empty is if Content-Length is 0, [''] ain't empty?

16 years agoRewrite Rack::Builder tests to avoid race-conditions
Christian Neukirchen [Tue, 16 Sep 2008 09:50:27 +0000 (11:50 +0200)]
Rewrite Rack::Builder tests to avoid race-conditions

16 years agoAdded another example demonstrating the Rack::Builder.app method.
Matt Todd [Sat, 13 Sep 2008 08:28:51 +0000 (04:28 -0400)]
Added another example demonstrating the Rack::Builder.app method.

16 years agoAdded spec for application initialization to be performed only once.
Matt Todd [Sat, 13 Sep 2008 08:21:38 +0000 (04:21 -0400)]
Added spec for application initialization to be performed only once.

16 years agoImplemented Rack::Builder.app and added specs.
Matt Todd [Sat, 13 Sep 2008 07:47:12 +0000 (03:47 -0400)]
Implemented Rack::Builder.app and added specs.

16 years agoAdd :secure option for set_cookie
Christian Neukirchen [Wed, 10 Sep 2008 16:56:46 +0000 (18:56 +0200)]
Add :secure option for set_cookie
By Brad Hilton.

16 years agoConditionalGet middleware (Last-Modified/Etag)
Christian Neukirchen [Tue, 9 Sep 2008 09:25:49 +0000 (11:25 +0200)]
ConditionalGet middleware (Last-Modified/Etag)

Adapted from Michael Klishin's implementation for Merb:
http://github.com/wycats/merb-core/tree/master/lib/merb-core/rack/middleware/conditional_get.rb

Implemented by Ryan Tomayko.

16 years agoAdd MethodOverride middleware to allow browsers to fake PUT and DELETE methods
Joshua Peek [Sun, 7 Sep 2008 17:20:22 +0000 (12:20 -0500)]
Add MethodOverride middleware to allow browsers to fake PUT and DELETE methods

16 years agoUpdate emongrel and add swiftiplied mongrel
Christian Neukirchen [Sun, 7 Sep 2008 18:20:30 +0000 (20:20 +0200)]
Update emongrel and add swiftiplied mongrel

16 years agoUpdate Rack::File
Christian Neukirchen [Sun, 7 Sep 2008 18:15:26 +0000 (20:15 +0200)]
Update Rack::File

  * Fix trouble with wrong Content-Length if File.size returns 0
  * Use Rack::Mime
  * Split _call into methods for easier subclassing

Based on a patch by Michael Fellinger.

16 years agoNew version of Rack::Directory
Christian Neukirchen [Sun, 7 Sep 2008 17:52:15 +0000 (19:52 +0200)]
New version of Rack::Directory

* Handles symlinks
  * Less disk access
  * Uses UTF8
  * Human-readable filesize from Bytes to Terabytes
  * Uses Rack::File as app by default
  * Does a File.expand_path on the
  * +root+ argument
  * Splits up the _call
  * method for easier
  * subclassing
  * Use new Rack::Mime

Based on a patch by Michael Fellinger.

16 years agoAdd Rack::Mime, a module containing a MIME-type list and helpers
Christian Neukirchen [Sun, 7 Sep 2008 15:51:44 +0000 (17:51 +0200)]
Add Rack::Mime, a module containing a MIME-type list and helpers
Proposed and implemented by Michael Fellinger.

16 years agoMake Rack::Lint::InputWrapper delegate size method to underlying IO object.
Michael S. Klishin [Fri, 5 Sep 2008 19:22:16 +0000 (22:22 +0300)]
Make Rack::Lint::InputWrapper delegate size method to underlying IO object.

See http://snurl.com/3nesq: Lint was breaking file uploads in a Merb app.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
16 years agoAdd Request#ip and corresponding spec
Michael Fellinger [Sat, 30 Aug 2008 07:47:50 +0000 (16:47 +0900)]
Add Request#ip and corresponding spec

16 years agoMake Rack::Lobster set Content-Length
Christian Neukirchen [Thu, 28 Aug 2008 13:57:14 +0000 (15:57 +0200)]
Make Rack::Lobster set Content-Length

16 years agoMake Rack::ShowExceptions set Content-Length
Christian Neukirchen [Thu, 28 Aug 2008 13:55:19 +0000 (15:55 +0200)]
Make Rack::ShowExceptions set Content-Length

16 years agoMake Rack::Response count Content-Length
Christian Neukirchen [Thu, 28 Aug 2008 13:54:21 +0000 (15:54 +0200)]
Make Rack::Response count Content-Length

16 years agoRemove empty FastCGI headers nginx likes to pass
Christian Neukirchen [Thu, 28 Aug 2008 13:47:47 +0000 (15:47 +0200)]
Remove empty FastCGI headers nginx likes to pass

16 years agoUpdate to version 0.4
Christian Neukirchen [Thu, 21 Aug 2008 10:26:47 +0000 (12:26 +0200)]
Update to version 0.4

16 years agoCosmetics
Christian Neukirchen [Thu, 21 Aug 2008 11:24:41 +0000 (13:24 +0200)]
Cosmetics

16 years agoFix packaging script
Christian Neukirchen [Thu, 21 Aug 2008 10:26:36 +0000 (12:26 +0200)]
Fix packaging script

16 years agoUpdate README
Christian Neukirchen [Thu, 21 Aug 2008 10:13:57 +0000 (12:13 +0200)]
Update README

16 years agoREQUEST_METHOD only must be a valid token
Christian Neukirchen [Tue, 19 Aug 2008 11:15:18 +0000 (13:15 +0200)]
REQUEST_METHOD only must be a valid token

16 years agoImprove test documentation
Christian Neukirchen [Sat, 9 Aug 2008 16:53:04 +0000 (18:53 +0200)]
Improve test documentation

16 years agoDon't test OpenID in the default test suite
Christian Neukirchen [Sat, 9 Aug 2008 16:52:33 +0000 (18:52 +0200)]
Don't test OpenID in the default test suite

16 years agoWrangle paths so finally lighttpd should start everything on all platforms correctly
Christian Neukirchen [Sat, 9 Aug 2008 16:52:03 +0000 (18:52 +0200)]
Wrangle paths so finally lighttpd should start everything on all platforms correctly

16 years agoDon't test openid if not available
Christian Neukirchen [Sat, 9 Aug 2008 16:50:33 +0000 (18:50 +0200)]
Don't test openid if not available

16 years agoDon't test mongrel if not available
Christian Neukirchen [Sat, 9 Aug 2008 16:49:53 +0000 (18:49 +0200)]
Don't test mongrel if not available

16 years agoSilence OpenID warnings
Christian Neukirchen [Sat, 9 Aug 2008 16:29:44 +0000 (18:29 +0200)]
Silence OpenID warnings

16 years agoMake memcache tests start and kill memcached itself
Christian Neukirchen [Sat, 9 Aug 2008 16:29:15 +0000 (18:29 +0200)]
Make memcache tests start and kill memcached itself