1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Freeze a few more string constants

Added .freeze to CODE_NAME, ERROR_400_RESPONSE, and ERROR_500_RESPONSE, I didn't see a reason why they weren't frozen
This commit is contained in:
tobinibot 2014-03-05 11:09:20 -05:00
parent c94b7995d2
commit 72691e8521

View file

@ -29,7 +29,7 @@ module Puma
module Const
PUMA_VERSION = VERSION = "2.8.0".freeze
CODE_NAME = "Sir Edmund Percival Hillary"
CODE_NAME = "Sir Edmund Percival Hillary".freeze
FAST_TRACK_KA_TIMEOUT = 0.2
@ -58,7 +58,7 @@ module Puma
PUMA_TMP_BASE = "puma".freeze
# Indicate that we couldn't parse the request
ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n".freeze
# The standard empty 404 response for bad requests. Use Error4040Handler for custom stuff.
ERROR_404_RESPONSE = "HTTP/1.1 404 Not Found\r\nConnection: close\r\nServer: Puma #{PUMA_VERSION}\r\n\r\nNOT FOUND".freeze
@ -69,7 +69,7 @@ module Puma
CONTENT_LENGTH = "CONTENT_LENGTH".freeze
# Indicate that there was an internal error, obviously.
ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n".freeze
# A common header for indicating the server is too busy. Not used yet.
ERROR_503_RESPONSE = "HTTP/1.1 503 Service Unavailable\r\n\r\nBUSY".freeze