about summary refs log tree commit homepage
path: root/lib/unicorn/const.rb
DateCommit message (Collapse)
2009-08-180.10.0r - rainbows! v0.10.0r
2009-08-16unicorn 0.90.0 v0.90.0
2009-08-15const: remove unused constants
2009-07-19unicorn 0.9.2 v0.9.2
2009-07-09unicorn 0.9.1 (merge 0.8.2) v0.9.1
* maint: unicorn 0.8.2 always set FD_CLOEXEC on sockets post-accept() Minor cleanups to core Re-add support for non-portable socket options Retry listen() on EADDRINUSE 5 times ever 500ms Unbind listeners as before stopping workers Conflicts: CHANGELOG lib/unicorn.rb lib/unicorn/configurator.rb lib/unicorn/const.rb
2009-07-09unicorn 0.8.2 v0.8.2
2009-07-01unicorn 0.9.0 v0.9.0
2009-07-01Force streaming input onto apps by default
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.
2009-06-30TrailerParser integration into ChunkedReader
Support for the "Trailer:" header and associated Trailer lines should be reasonably well supported now
2009-06-29ACK clients on "Expect: 100-continue" header
By responding with a "HTTP/1.1 100 Continue" response to encourage a client to send the rest of the body. This is part of the HTTP/1.1 standard but not often implemented by servers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3 This will speed up curl uploads since curl sleeps up to 1 second if no response is received: http://curl.haxx.se/docs/faq.html#My_HTTP_POST_or_PUT_requests_are
2009-06-05Transfer-Encoding: chunked streaming input support
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
2009-05-28unicorn 0.8.1 v0.8.1
2009-05-26unicorn 0.8.0 v0.8.0
2009-05-25Switch to autoload to defer requires
This should prevent Rack from being required too early on so "-I" being passed through the unicorn command-line can modify $LOAD_PATH for Rack
2009-05-22Merge commit 'v0.7.1'
* commit 'v0.7.1': unicorn 0.7.1 Conflicts: lib/unicorn/const.rb
2009-05-22unicorn 0.7.1 v0.7.1
2009-05-13privatize constants only used by old_rails/static
Unicorn proper no longer needs these constants, so don't bother with them.
2009-05-13Require Rack for HTTP Status codes
Preventing needless duplication since Rack already has these codes for us. Also, put the status codes in HttpResponse since nothing else needs (or should need) them.
2009-04-25unicorn 0.7.0 v0.7.0
2009-04-24unicorn 0.6.0 v0.6.0
2009-04-23http_response: minor performance gains
Avoid creating garbage every time we lookup the status code along with the message. Also, we can use global const arrays for a little extra performance because we only write one-at-a time Looking at MRI 1.8, Array#join with an empty string argument is slightly better because it skips an append for every iteration.
2009-04-23Get rid of UNICORN_TMP_BASE constant
It was just a waste of space and would've caused line wrapping. This reinstates the "unicorn" prefix when we create tempfiles, too.
2009-04-21const: remove unused QUERY_STRING constant
2009-04-16unicorn 0.5.3 v0.5.3
2009-04-16remove DATE constant
We never use it anywhere explicitly for hash lookups
2009-04-16unicorn 0.5.2 v0.5.2
2009-04-16unicorn/const: kill trailing whitespace
Trailing whitespace glows *RED* every time I open this file to edit a constant and that annoys me.
2009-04-13unicorn 0.5.1 v0.5.1
2009-04-13unicorn 0.5.0 v0.5.0
2009-04-02unicorn 0.4.2 v0.4.2
2009-04-01unicorn 0.4.1 v0.4.1
2009-03-29http11: use :http_body instead of "HTTP_BODY"
"HTTP_BODY" could conflict with a "Body:" HTTP header if there ever is one. Also, try to hide this body from the Rack environment before @app is called since it is only used by Unicorn internally.
2009-03-27Always try to send a valid HTTP response back
This reworks error handling throughout the entire stack to be more Ruby-ish. Exceptions are raised instead of forcing the us to check return values. If a client is sending us a bad request, we send a 400. If unicorn or app breaks in an unexpected way, we'll send a 500. Both of these last-resort error responses are sent using IO#write_nonblock to avoid tying Unicorn up longer than necessary and all exceptions raised are ignored. Sending a valid HTTP response back should reduce the chance of us from being marked as down or broken by a load balancer. Previously, some load balancers would mark us as down if we close a socket without sending back a valid response; so make a best effort to send one. If for some reason we cannot write a valid response, we're still susceptible to being marked as down. A successful HttpResponse.write() call will now close the socket immediately (instead of doing it higher up the stack). This ensures the errors will never get written to the socket on a successful response.
2009-03-25Merge commit 'v0.2.3'
* commit 'v0.2.3': unicorn 0.2.3 Ensure Tempfiles are unlinked after every request Don't bother unlinking UNIX sockets Conflicts: lib/unicorn/socket.rb
2009-03-25unicorn 0.2.3 v0.2.3
2009-03-22Streamline rack environment generation
Ensure constants are used as hash keys and cleanup unused constants. This gives a 10-15% improvement with test/benchmark/request.rb
2009-03-22unicorn 0.2.2 v0.2.2
2009-03-18unicorn v0.2.1, fix the Manifest v0.2.1
2009-03-18unicorn 0.2.0 v0.2.0
2009-02-21Register default constants in Const module
This will make setting some of this easier to deal with in the executable.
2009-02-09update version and changelog
2009-02-09Get rid of HeaderOut and simplify HttpResponse
Just stuff what little logic we had for it into HttpResponse since Rack takes care of the rest for us. Put the HTTP_STATUS_HEADERS hash in HttpResponse since we're the only user of it. Also, change HttpResponse.send to HttpResponse.write to avoid overriding the default method.
2009-02-09Don't set SCRIPT_NAME to "/" and then clear it for Rack
It's pointless...
2009-02-09Simplify HttpResponse since we only handle Rack now
The previous API was very flexible, but I don't think many people really cared for it... We now repeatedly use the same HeaderOut in each process since I completely don't care for multithreading.
2009-02-09pre-generate HTTP_STATUS_HEADER to avoid repeated snprintf
Regenerating headers constantly is a waste of time.
2009-02-09Remove StringIO usage in HeaderOut
It's more GC-friendly to just use an array than to repeatedly append short strings on top of each other. I also find StringIO confusing...
2009-02-09s/Mongrel/Unicorn/g
Avoid conflicting with existing Mongrel libraries since we'll be incompatible and break things w/o disrupting Mongrel installations.