http_response: implement httpdate in C
commitd100025759450dd1cbeccd1a3e44c46921bba26b
authorEric Wong <normalperson@yhbt.net>
Wed, 5 Jan 2011 01:50:51 +0000 (4 17:50 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 5 Jan 2011 01:51:59 +0000 (4 17:51 -0800)
tree8f623be43ae96cc9246a43b01fb5650751ca3769
parent6183611108c571dbed29dfe2854b9f06757fd27f
http_response: implement httpdate in C

This can return a static string and be significantly
faster as it reduces object allocations and Ruby method
calls for the fastest websites that serve thousands of
requests a second.

It assumes the Ruby runtime is single-threaded, but that
is the case of Ruby 1.8 and 1.9 and also what Unicorn
is all about.  This change is safe for Rainbows! under 1.8
and 1.9.
GNUmakefile
ext/unicorn_http/extconf.rb
ext/unicorn_http/httpdate.c [new file with mode: 0644]
ext/unicorn_http/unicorn_http.rl
lib/unicorn/http_response.rb
test/unit/test_response.rb