Date | Commit message (Collapse) |
|
This was broken since v3.3.1[1] and v1.1.6[2] since nginx relies on
a closed socket (and not Content-Length/Transfer-Encoding) to
detect a response completion. We have to close the client
socket before invoking GC to ensure the client sees the response
in a timely manner.
[1] - commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed
[2] - commit b7a0074284d33352bb9e732c660b29162f34bf0e
(cherry picked from commit faeb3223636c39ea8df4017dc9a9d39ac649b26d)
Conflicts:
examples/big_app_gc.rb
lib/unicorn/oob_gc.rb
|
|
This makes the user (sysadmin in this case) more aware if the
upgrade fails or doesn't work as intended. This change could be
more useful for Rainbows! with its long-running responses.
|
|
While second nature to myself, stderr_path may be an
overlooked configuration parameter for some users. Also,
add a minimal sample configuration file that is shorter
and hopefully less intimidating to new users.
|
|
|
|
|
|
This may be used as a basis of other scripts so we need
to stash $1 before we "set -u"
|
|
Thanks to Michael Guterl for informing us of the issues
and testing the monkey patch.
|
|
These should help make things easier for folks unfamiliar
with nginx setups.
|
|
It's too simple of a script and causes running the init script
with zero arguments to fail instead of printing out the usage
message.
|
|
From RFC 2616, section 14.20:
> Comparison of expectation values is case-insensitive for
> unquoted tokens (including the 100-continue token), and is
> case-sensitive for quoted-string expectation-extensions.
|
|
There's a small memory reduction to be had when forking
oodles of processes and the Perl hacker in me still
gets confused into thinking those are arrays...
|
|
Now that upstream curl supports this functionality, there's
no reason to duplicate it here as an example.
|
|
This change gives applications full control to deny clients
from uploading unwanted message bodies. This also paves the
way for doing things like upload progress notification within
applications in a Rack::Lint-compatible manner.
Since we don't support HTTP keepalive, so we have more freedom
here by being able to close TCP connections and deny clients the
ability to write to us (and thus wasting our bandwidth).
While I could've left this feature off by default indefinitely
for maximum backwards compatibility (for arguably broken
applications), Unicorn is not and has never been about
supporting the lowest common denominator.
|
|
Then hopefully soon we'll be able to get rid of this script...
|
|
This includes an example of tunneling the git protocol inside a
TE:chunked HTTP request. The example is unfortunately contrived
in that it relies on the custom examples/cat-chunk-proxy.rb
script in the client. My initial wish was to have a generic
tool like curl(1) operate like this:
cat > ~/bin/cat-chunk-proxy.sh <<EOF
#!/bin/sh
exec curl -sfNT- http://$1:$2/
EOF
chmod +x ~/bin/cat-chunk-proxy.sh
GIT_PROXY_COMMAND=cat-chunk-proxy.sh git clone git://0:8080/foo
Unfortunately, curl will attempt a blocking read on stdin before
reading the TCP socket; causing the git-clone consumer to
starve. This does not appear to be a problem with the new
server code for handling chunked requests.
|
|
This adds support for handling POST/PUT request bodies sent with
chunked transfer encodings ("Transfer-Encoding: chunked").
Attention has been paid to ensure that a client cannot OOM us by
sending an extremely large chunk.
This implementation is pure Ruby as the Ragel-based
implementation in rfuzz didn't offer a streaming interface. It
should be reasonably close to RFC-compliant but please test it
in an attempt to break it.
The more interesting part is the ability to stream data to the
hosted Rack application as it is being transferred to the
server. This can be done regardless if the input is chunked or
not, enabling the streaming of POST/PUT bodies can allow the
hosted Rack application to process input as it receives it. See
examples/echo.ru for an example echo server over HTTP.
Enabling streaming also allows Rack applications to support
upload progress monitoring previously supported by Mongrel
handlers.
Since Rack specifies that the input needs to be rewindable, this
input is written to a temporary file (a la tee(1)) as it is
streamed to the application the first time. Subsequent rewinded
reads will read from the temporary file instead of the socket.
Streaming input to the application is disabled by default since
applications may not necessarily read the entire input body
before returning. Since this is a completely new feature we've
never seen in any Ruby HTTP application server before, we're
taking the safe route by leaving it disabled by default.
Enabling this can only be done globally by changing the
Unicorn HttpRequest::DEFAULTS hash:
Unicorn::HttpRequest::DEFAULTS["unicorn.stream_input"] = true
Similarly, a Rack application can check if streaming input
is enabled by checking the value of the "unicorn.stream_input"
key in the environment hashed passed to it.
All of this code has only been lightly tested and test coverage
is lacking at the moment.
[1] - http://tools.ietf.org/html/rfc2616#section-3.6.1
|
|
This was done in Bourne shell because it's easier for UNIX
sysadmins who don't know Ruby to understand and modify.
Additionally, it can be used for nginx or anything else
that shares compatible signal handling.
|
|
It is no longer relevant (or working) with rackup compatibility.
|
|
|
|
|
|
|
|
|
|
and configuration option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@245 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@224 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@210 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@209 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@208 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
the MAX_BODY threshold. The only change here really is that HttpRequest#body is now an IO object rather than a string. I changed the various handlers to support this.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@157 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
now allows passing back of an IO object, to allow large file streaming. Simpler underscore replacement on Tepee wiki words.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@154 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
possibilities.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@139 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Small change to config tool.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@123 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@121 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
only have 1.3 camping.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@119 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@116 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@104 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
HttpServer (rather than acceptor thread).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@90 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@86 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
two lines.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@85 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Modified the win32 gems to require win32-service. Created a gem for win32-service.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@56 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
CGI Handler (my guess). Also fixed the "graceful stop" in mongrel_simple_service because cause also errors (how gracefully it is?)
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@55 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
incompatible with win32 ruby (CRLF) (actally that made the scripts useless, now solved).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@54 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
This change does that.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@53 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@52 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Luis.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@51 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Site updated to announce this.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@37 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@30 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@23 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@22 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@21 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
variables people need. * Now create a REQUEST_URI which other CGI variables derive from. Implemented a simple DirHandler for browsing a directory and sending the files.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@20 19e92222-5c0b-0410-8929-a290d50e31e9
|