http11: cleanup+safer rack.url_scheme handling
commitac44225fb21e0dbc3a716cec3ea3133a0b2435a0
authorEric Wong <normalperson@yhbt.net>
Mon, 13 Apr 2009 04:52:48 +0000 (12 21:52 -0700)
committerEric Wong <normalperson@yhbt.net>
Mon, 13 Apr 2009 04:56:28 +0000 (12 21:56 -0700)
treee476b5db46b2a489b4dce0b64e927a193676c231
parent62ebc930c6e3b46cd200212748800c1ca448eb1f
http11: cleanup+safer rack.url_scheme handling

Avoid using strcmp() since it could break badly if
Ruby ever stopped null-terminating strings C-style.

We're also freezing "http" as a global.  Rack does not
explicitly permit nor deny this, and Mongrel has always
used frozen strings as hash values in other places.
ext/unicorn/http11/http11.c
test/unit/test_request.rb