about summary refs log tree commit homepage
path: root/ext/unicorn_http/extconf.rb
DateCommit message (Collapse)
2018-12-12deduplicate strings VM-wide in Ruby 2.5+
String#-@ deduplicates strings starting with Ruby 2.5.0 Hash#[]= deduplicates strings starting in Ruby 2.6.0-rc1 This allows us to save a small amount of memory by sharing objects with other parts of the stack (e.g. Rack).
2016-11-09drop rb_str_set_len compatibility replacement
While it is innocuous after compiling, it can be a confusing source of errors for users with broken installations of Ruby itself: https://bogomips.org/unicorn-public/5ace6a20-e094-293d-93df-b557480e12d5@anyces.com/ https://bogomips.org/unicorn-public/02994a55-9c07-a3c5-f06b-a4c15551a67e@anyces.com/ rb_str_set_len has been provided since Ruby 1.8.7+, so we have not needed it since we dropped all 1.8.x support in unicorn 5.x.
2015-05-29http: use rb_hash_clear in Ruby 2.0+
Calling the function directly avoids the overhead of Ruby method table lookup and global method cache. The only downside is this is now hidden from tracers and cannot be overridden from Ruby, but I doubt anybody cares about that.
2011-05-05http_parser: add max_header_len accessor
Rainbows! wants to be able to lower this eventually...
2011-01-04http_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.
2010-12-29http: remove unnecessary dir_config statement
We do not link against any external libraries
2010-06-10http: cleanups for latest Rubinius
Rubinius now supports rb_str_set_len() and sets -fPIC. We shouldn't check for rb_str_modify() since link-time detection is broken under Rubinius and even 1.8.6 has rb_str_modify().
2009-09-18http: don't force -fPIC if it can't be used
Not everybody can use it, even if most of the world can.
2009-09-14http: compile with -fPIC
Rubinius doesn't seem to set this by default
2009-09-14http: no-op rb_str_modify() for Rubies without it
Rubinius has no rb_str_modify() function, it /may/ not need it.
2009-09-14http: define OFFT2NUM macro on Rubies without it
Hope they have the LL2NUM macro (Rubinius does)
2009-09-08"encoding: binary" comments for all sources (1.9)
This ensures any string literals that pop up in *our* code will just be a bag of bytes. This shouldn't affect/fix/break existing apps in most cases, but most constants will always have the "correct" encoding (none!) to be consistent with HTTP/socket expectations. Since this comment affects things only on a per-source basis, it won't affect existing apps with the exception of strings we pass to the Rack application. This will eventually allow us to get rid of that Unicorn::Z constant, too.
2009-08-09extconf: SIZEOF_OFF_T should be a ruby.h macro
Only fallback to check_sizeof() if it is not. check_sizeof() is broken in Ruby 1.9.2preview1 (but fixed in trunk).
2009-08-09unicorn_http: add helpful macros
We'll be needing the UH_OFF_T_MAX define for the chunked body handling and rb_str_set_len may be needed as well.
2009-07-15Rename unicorn/http11 => unicorn_http
We couldn't do proper namespacing for the C module so there was a potential conflict with Init_http11() in Mongrel. This was needed because Mongrel's HTTP parser could be used in some applications and we may be unfortunate enough need to support them.