From d2cf84c6fffec3367dec167c519e4a838bf09d3f Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 5 Jan 2018 22:47:59 +0900 Subject: [PATCH 2/3] Add 103 Early Hints see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml --- lib/net/http/responses.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index d57348b82f..617cd67328 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -35,6 +35,9 @@ class Net::HTTPSwitchProtocol < Net::HTTPInformation # 101 class Net::HTTPProcessing < Net::HTTPInformation # 102 HAS_BODY = false end +class Net::HTTPEarlyHints < Net::HTTPInformation # 103 - RFC 8297 + HAS_BODY = false +end class Net::HTTPOK < Net::HTTPSuccess # 200 HAS_BODY = true @@ -232,6 +235,7 @@ class Net::HTTPResponse '100' => Net::HTTPContinue, '101' => Net::HTTPSwitchProtocol, '102' => Net::HTTPProcessing, + '103' => Net::HTTPEarlyHints, '200' => Net::HTTPOK, '201' => Net::HTTPCreated, -- 2.15.1