about summary refs log tree commit homepage
path: root/lib/unicorn/const.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-16 16:56:22 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-16 16:56:22 -0700
commit04c7fc37ab4fb2fbaa1b4a2570871713cf9d1319 (patch)
tree5a4baecb4b9ee95dd7ca7970141ffe48168e61a2 /lib/unicorn/const.rb
parent045f6d741020d4a77bd68bd80891a97782d54850 (diff)
downloadunicorn-04c7fc37ab4fb2fbaa1b4a2570871713cf9d1319.tar.gz
This gives applications more rope to play with in case they have
any reasons for changing some values of the default constants.

Freezing strings for Hash assignments still speeds up MRI, so
we'll keep on doing that for now (and as long as MRI supports
frozen strings, I expect them to always be faster for Hashes
though I'd be very happy to be proven wrong...)
Diffstat (limited to 'lib/unicorn/const.rb')
-rw-r--r--lib/unicorn/const.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb
index bda6e46..b7a3690 100644
--- a/lib/unicorn/const.rb
+++ b/lib/unicorn/const.rb
@@ -7,11 +7,11 @@ module Unicorn
   # gave about a 3% to 10% performance improvement over using the strings directly.
   # Symbols did not really improve things much compared to constants.
   module Const
-    UNICORN_VERSION="0.91.0".freeze
+    UNICORN_VERSION="0.91.0"
 
-    DEFAULT_HOST = "0.0.0.0".freeze # default TCP listen host address
-    DEFAULT_PORT = "8080".freeze    # default TCP listen port
-    DEFAULT_LISTEN = "#{DEFAULT_HOST}:#{DEFAULT_PORT}".freeze
+    DEFAULT_HOST = "0.0.0.0" # default TCP listen host address
+    DEFAULT_PORT = "8080"    # default TCP listen port
+    DEFAULT_LISTEN = "#{DEFAULT_HOST}:#{DEFAULT_PORT}"
 
     # The basic max request size we'll try to read.
     CHUNK_SIZE=(16 * 1024)
@@ -24,8 +24,8 @@ module Unicorn
     MAX_BODY=MAX_HEADER
 
     # common errors we'll send back
-    ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n".freeze
-    ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n".freeze
+    ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
+    ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
     EXPECT_100_RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n"
 
     # A frozen format for this is about 15% faster