Date | Commit message (Collapse) |
|
"/dev/null" must be opened in binary mode for Rack-compliance.
Additionally, avoid '' to create an empty string and use
Unicorn::Z instead.
|
|
With the 1.9.2preview1 release (and presumably 1.9.1 p243), the
Ruby core team has decided that bending over backwards to
support crippled operating/file systems was necessary and that
files must be closed before unlinking.
Regardless, this is more efficient than using Tempfile because:
1) no delegation is necessary, this is a real File object
2) no mkdir is necessary for locking, we can trust O_EXCL
to work properly without unnecessary FS activity
3) no finalizer is needed to unlink the file, we unlink
it as soon as possible after creation.
(cherry picked from commit 344b85ff28e160daa6563ab7c80b733abdeb874a)
Conflicts:
lib/unicorn.rb
lib/unicorn/app/exec_cgi.rb
lib/unicorn/tee_input.rb
|
|
If we're using middleware that pushes the body into an
array, bad things will happen if we're clobbering the
string for each iteration of body#each.
|
|
This reduces garbage generation to improve performance. Rack
1.0 allows InputWrapper to read with an explicit buffer.
|
|
Don't allow newly created IO objects to get GC'ed and
subsequently close(2)-ed. We're not reopening the
{$std,STD}{in,out,err} variables since those can't be
trusted to have fileno 1, 2 and 3 respectively.
|
|
This is a Rack handler that passes Rack::Lint running cgit
and so it has been lightly tested. No other CGI executables
have been run with it.
|