Date | Commit message (Collapse) |
|
This method is gone from rack 2.0 and not even necessary in Ruby
1.8.7. Yes, this breaks compatibility with Ruby 1.8.6 :P
|
|
Ruby 2.1.0 and later exposes Process.clock_gettime, resulting
in less garbage and access to the monotonic clock if it is
available. Try to use it to achieve feature parity with the
C extension (which has always used the monotonic clock if possible).
|
|
For users unable to compile the C extension, multithreaded usage
of clogger could return invalid request time measurements.
This does not affect users of the C extension.
|
|
:to_io never was a Rack extension, and ends up breaking the case
where an SSL socket is proxied. The role of :to_io in IO-like
objects is to aid IO.select and like methods.
|
|
Rack::Lint::ErrorWrapper forbids the "<<" method. This
fallback only comes into play when no log destination
(via :logger or :path) is specified and is rarely an
issue in real setups.
|
|
These values are untrusted, so if any client sends them to us
we must escape them.
|
|
This matches the behavior of nginx 1.0.9
|
|
This doesn't apply to people that use strftime()-formats,
but that's a minority.
|
|
This appeared in nginx 0.9.6
|
|
No need to actually create the hash, just load the constant
|
|
This optimization is used by Rainbows! to pass IO objects
to the response body.
|
|
We can just make Clogger#respond_to? smarter and forward
everything except :close to the body we're proxying.
|
|
It was totally broken but nobody uses uses it, so it
went unnoticed since the beginning of time.
|
|
This lessens confusion for people configuring Clogger in
config.ru, since "File" could be mistaken for Rack::File
and "::File" needs to be specified.
|
|
Certain configurations of Rainbows! (and Zbatery) are able to
use the return value of body.to_path to serve static files
more efficiently.
This also allows middleware like Rack::Contrib::Sendfile to
work properly higher up the stack, too.
|
|
We no longer write the log out at the end of the body.each call.
This is a behavioral change, but fortunately all Rack servers
I've seen call body.close inside an ensure.
This allows us to later pass along the "to_path" method
and not rely on "each" to write the log.
|
|
This quiets down warnings when used with RubyGems loaders such
as Isolate and Bundler where the HTTP server already loaded
Rack.
|
|
Clogger may set this value independently of "rack.multithread"
since Actor/Fiber-based servers may have multiple instances of
Clogger wrapping different response bodies and yet be
incompatible with "rack.multithread"
|
|
hacking the C extension with RSTRING_LEN() is so much easier :P
|
|
instance variable lookups are expensive as-is
|
|
Since the wrapped Clogger object always responds to
close, we cannot blindly delegate the close method to
the body without ensuring it can be closed. So ensure
that it can be closed before attempting to close it,
all return values and errors are trapped and returned.
Reported-by: IƱaki Baz Castillo
|
|
It's expensive to create if not needed, and no current released
version of Rack has my proposed optimizations for it yet...
|
|
No point in having extra code to do case-insensitive lookups,
especially since the HeaderHash implementation is already in
wide use and will only get faster as time goes by.
|
|
This allows overriding the default of "\n". Behavior remains
similar to IO#puts, the :ORS (output record separator) is
appended iff the format doesn't already end with that string.
|
|
Userspace buffering defaults are dangerous as the Ruby default
IO objects do not do line-aware buffering. This makes the
README examples with File.open much safer to use out-of-the-box
for users of the pure-Ruby version. For users on the MRI C
extension logging to regular files, this should not have any
effect as we've optimized those to do unbuffered write(2)
syscalls anyways.
|
|
Back in HTTP/0.9 days (before it was called HTTP/0.9),
"GET /uri/goes/here\r\n" was a valid HTTP request.
See rfc 1945, section 4.1 for details on this ancient
"Simple-Request" scheme used by HTTP/0.9 clients.
|
|
The pure variant was using lower-case output instead
of upper case, the ext variant was actually fine in this
case. This is for nginx output format compatibility.
|
|
We're not Rack::Lint, but we still need to take steps to
avoid segfaulting if we host non-Rack::Lint-compliant
applications.
This also updates the pure variant to fail on bad applications,
too.
|
|
Some misbehaved apps can do this to us, and we don't want
the C extension to segfault when this happens.
|
|
This was documented in the README but never implemented. Some
popular web servers set REQUEST_URI even though it's not
required by Rack, so allow this variable to be used if possible.
As a side effect, it is also less likely to be modified by
certain handlers (*cough*Rails::Rack::Static*cough*).
|
|
|