Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 100-199 status codes from constant. #1064

Merged
merged 1 commit into from
Sep 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/puma/const.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ class UnsupportedOption < RuntimeError
# 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
Expand Down