summary refs log tree commit
DateCommit message (Collapse)
2010-10-03Move sid initialization to another method so it can be overwritten by other ↵
frameworks. Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Adding support for securerandom, will be in use by default. n.b. hacky test
2010-10-03186 bro :'(
2010-10-03Merge branch 'perfix' of http://github.com/thedarkone/rack into ↵
thedarkone-perfix * 'perfix' of http://github.com/thedarkone/rack: No need to delete a key that doesn't exist. Avoiding invoking #delete unless unnecessary. Fix the phantom header key bug. Revert "Don't set header to nil on HeaderHash#include?"
2010-10-03PERF: change inject({}) to Hash + map
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03PERF: just using a map here is fine
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03PERF: change inject({}) to Hash + map
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Etag middleware should not return a digest if body is empty and should also ↵
allow a default cache directive when no caching is done.
2010-10-03Fix Memcached tests.
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Improve performance of cookie store by unpacking the data just once.
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Improves performance by lazy loading the session.
The session has two flags, one for reading and another for writing. If the session is just read, we get it from the store but do not send a cookie a back to the client unless it was written. This commit also adds Rack::Request#ssl? for convenience. Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Spec that referer no longer defaults to '/', but is allowed to be nil
2010-10-03do not default referer to '/'
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Cleanup whitespace and docs from patch
2010-10-03modified rack::static comment to reflect new routes
Signed-off-by: raggi <jftucker@gmail.com>
2010-10-03Added the ability to pass a hash of route to file mappings to Rack::Static
Signed-off-by: raggi <jftucker@gmail.com>
2010-09-24No need to delete a key that doesn't exist.
2010-09-22Avoiding invoking #delete unless unnecessary.
2010-09-22Fix the phantom header key bug.
Bug report: http://groups.google.com/group/rack-devel/browse_thread/thread/cb0548dfe7a70702.
2010-09-22Revert "Don't set header to nil on HeaderHash#include?"
The change is a bit messy. This reverts commit f6f3c60938ea3b08f3292a2480e6753c293584e5.
2010-09-23Adjust rest of comment of Sendfile
2010-09-22Adjust indentation of Sendfile source
2010-09-22Fix comment in Sendfile
2010-09-21Need to properly escape UTF-8 strings in 1.9.2
Rack was generating warnings in 1.9.2: ...rack/utils.rb:16: warning: regexp match /.../n against to UTF-8 string Modified the regex in utils to support UTF-8. Did not add tests since the multibyte escape tests cover this case when in 1.9.2. Verified tests pass in: 1.8.6-p399, 1.8.7-p302, ree-1.8.7-2010.02, 1.9.2-p0
2010-09-11Include all values for repeated response headers in WEBrick. Closes #52.
2010-09-11Should only handle 200 responses on conditional get middleware.
2010-09-11Adding Rakefile to rack.gemspec
2010-09-09Skip Rack::Lint::InputWrapper serialization in TestRequest. Makes tests pass ↵
on Ruby 1.9.1p378.
2010-09-09Avoid failing tests on platforms that do not support fork (JRuby/Windows). ↵
Relies on fork raising a NotImplementedError on those platforms, which both MRI and JRuby do.
2010-09-08return array instead of string as request body, so it works on 1.9
2010-09-08memcache raises a RuntimeError on 1.9.2p0, too
2010-09-07Ensure the HTTP Cache-Control is set in the Etag middleware if none was ↵
given. It is extremally important to mark these responses as private by default.
2010-09-02updated escape_html to use hex entities and to escape forward slash
Small merge work required. Signed-off-by: raggi <jftucker@gmail.com>
2010-09-02Make ShowExceptions respond with plain text on AJAX calls.
Signed-off-by: raggi <jftucker@gmail.com>
2010-09-02Alias Response#to_ary to #finish for implicit-splat in Ruby 1.9.2.
* In Ruby 1.9.2 #to_ary is required for implicit-splat. http://redmine.ruby-lang.org/issues/show/1393 Signed-off-by: raggi <jftucker@gmail.com>
2010-08-06Should set ETag only if status is 200 or 201.
Signed-off-by: raggi <jftucker@gmail.com>
2010-08-06Refactor session stores by providing a with_lock helper and by moving the ↵
responsitility to handle :renew and :drop up to Abstract::ID. Signed-off-by: raggi <jftucker@gmail.com>
2010-08-06Make a few changes to the session store:
* Provide :cookie_only as option and as default. If false, allows SID to be retrieved from GET/POST params; * Do not send the cookie back to the client if session id did not change; * Make Abstract::ID implementation more modular, allowing Cookie implementation to be simpler by inheriting from it; Signed-off-by: raggi <jftucker@gmail.com>
2010-07-19Update docs and minor corrections.
2010-07-19ETag middleware should not be triggered in sendfile bodies.
Signed-off-by: raggi <jftucker@gmail.com>
2010-07-19Remove unneeded monkey patch to Rack::File from Rack::Sendfile
2010-07-19Rack::Etag should not set ETag if Last-Modified header is sent.
The HTTP specification says that if both Last-Modified and ETag are sent, both should be matched in other to check if a request is fresh or not. If Rack always set ETag, even if Last-Modified is sent, checking the freshness according to specification becomes non trivial, since I will always need the digested body response. Signed-off-by: raggi <jftucker@gmail.com>
2010-07-19Make ConditionalGet middleware respect HTTP specification.
The specification says if both IF_NONE_MATCH and IF_MODIFIED_SINCE are sent, both should match in order to return 304. Signed-off-by: raggi <jftucker@gmail.com>
2010-07-12Rack::Server should accept :app and override :config.
Signed-off-by: raggi <jftucker@gmail.com>
2010-07-08The application should be loaded prior to daemonization to prevent issues ↵
with chdir etc.
2010-07-08Debugging should not change semantics of load path or require modification ↵
before loading the application
2010-07-01Modified Rack::Request#port to respect HTTP_X_FORWARDED_HOST port ↵
information if available
2010-06-17Update gitignore to ignore compiled classes and the lighttpd error log
2010-06-17Use ::File.unlink in place of Tempfile#unlink to avoid 1.9.1 bug
2010-06-17Fix ESCAPE_HTML_PATTERN construction