Date | Commit message (Collapse) |
|
|
|
|
|
Reverts the hard test for a 'PUT' request method (8d01dc0) and
uses the Content-Type to determine whether to read into the
request body. The Request#POST method parses the request body
if (and only if) either of the following conditions are met:
1. The request's Content-Type is application/x-www-form-urlencoded
or multipart/form-data. Note: the REQUEST_METHOD is ignored in
this case.
2. The original REQUEST_METHOD is 'POST' and no Content-Type header
was specified in the request. Note that we use the REQUEST_METHOD
value before any modifications by the MethodOverride middleware.
This is very similar to how this worked prior to 8d01dc0 but
narrows the 'no Content-Type' special case to apply only to
POST requests. A PUT request with no Content-Type header would
trigger parsing before - with this change only POST requests
with no Content-Type trigger parsing.
|
|
|
|
can change their behavior [#71 state:resolved]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rack::Lint does not allow header values yielded by #each to be
non-String objects, so we join them like we do in #to_hash.
This finally allows HeaderHash to be passed in the Rack response
as a header without needing #to_hash.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
Since HeaderHash is cheaper to use now, encourage its usage
instead of reinventing a way to lookup header values with
an enforced O(n) overhead.
Under best conditions, this can now be done in O(1) time if the
rest of our middleware stack already uses (and passes)
HeaderHash. This does make things slower if CommonLogger is the
only middleware in the stack, however that's probably not too
common.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
Since HeaderHash objects are valid header responses, avoid
converting the headers to Hash objects only to have it
reconverted back to HeaderHash in the next middleware.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
Creating a new HeaderHash is an O(n) operation in addition to
the cost of allocating a new object. When using multiple pieces
of middleware, this can lead to unnecessary memory allocation
and iteration overhead. We now explicitly define the
HeaderHash.new class method to return its original argument if
it is already a HeaderHash to avoid repeating work.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
time as a chunk (i.e. we've reached EOL and buffer is empty)
|
|
boundary and patch multipart parser so it passes it - the failing test case comes with a sample payload specific to the fact that the default bufsize used by the multipart parser is exactly 16384. should this default be changed, the test will no longer apply.
|
|
|
|
handlers because PATH_INFO must not be nil according to SPEC
[#75 state:resolved]
|
|
* memcache-session-bugfix:
Test-fix for shallow copy change checks
Added test for deep hash checks, prevent shallow copy check failure
Session::Memcache fixes
Updating Session::Memcache test
Inlining of #merge_sessions
|
|
Simplification of new/missing session keys
|
|
Rewording variables for clarity
|
|
Restructing logical branches to be less inlince
Uniform naming of variables
Fix of of inline session merging
|
|
Pointless instantiation removed
Moved bad connection check above good connection check
A blank string for the server specification uses defaults, fixed
|
|
|
|
* quoted-string-cookies:
Test added to check to ensure that quoted values are properly parsed
|
|
Using a regular expression to identify quoted string values, could be optimized
|
|
|
|
|
|
"The status, if parsed as integer (to_i), must be greater than or equal
to 100."
|
|
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
Removal of references in Rakefile and the core include
|
|
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
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>
|