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:
commit
71007dfe81
1 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue