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

Merge pull request #1064 from frodsan/refactor-status-with-no-content

Remove 100-199 status codes from constant.
This commit is contained in:
Evan Phoenix 2016-09-01 11:13:58 -07:00 committed by GitHub
commit 71007dfe81

View file

@ -76,12 +76,11 @@ module Puma
# For some HTTP status codes the client only expects headers.
#
no_body = {}
((100..199).to_a << 204 << 205 << 304).each do |code|
no_body[code] = true
end
STATUS_WITH_NO_ENTITY_BODY = no_body
STATUS_WITH_NO_ENTITY_BODY = {
204 => true,
205 => true,
304 => true
}
# Frequently used constants when constructing requests or responses. Many times
# the constant just refers to a string with the same contents. Using these constants