about summary refs log tree commit homepage
path: root/lib/unicorn/const.rb
DateCommit message (Collapse)
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.