[前][次][番号順一覧][スレッド一覧]

ruby-changes:32000

From: naruse <ko1@a...>
Date: Mon, 9 Dec 2013 02:11:54 +0900 (JST)
Subject: [ruby-changes:32000] naruse:r44079 (trunk): * lib/net/http/responses.rb:

naruse	2013-12-09 02:11:46 +0900 (Mon, 09 Dec 2013)

  New Revision: 44079

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44079

  Log:
    * lib/net/http/responses.rb:
      Add `HTTPIMUsed`, as it is also supported by rack/rails.
      RFC - http://tools.ietf.org/html/rfc3229
      by Vipul A M <vipulnsward@g...>
      https://github.com/ruby/ruby/pull/447 fix GH-447

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/http/responses.rb
    trunk/lib/net/http.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44078)
+++ ChangeLog	(revision 44079)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Dec  9 02:10:32 2013  NARUSE, Yui  <naruse@r...>
+
+	* lib/net/http/responses.rb:
+	  Add `HTTPIMUsed`, as it is also supported by rack/rails.
+	  RFC - http://tools.ietf.org/html/rfc3229
+	  by Vipul A M <vipulnsward@g...>
+	  https://github.com/ruby/ruby/pull/447 fix GH-447
+
 Sun Dec  8 20:47:35 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* class.c (rb_get_kwargs): when values is non-null, remove
Index: lib/net/http/responses.rb
===================================================================
--- lib/net/http/responses.rb	(revision 44078)
+++ lib/net/http/responses.rb	(revision 44079)
@@ -57,7 +57,9 @@ class Net::HTTPMultiStatus < Net::HTTPSu https://github.com/ruby/ruby/blob/trunk/lib/net/http/responses.rb#L57
   HAS_BODY = true
 end
 # 208 Already Reported - RFC 5842; experimental
-# 226 IM Used - RFC 3229; no famous implementation known
+class Net::HTTPIMUsed < Net::HTTPSuccess                        # 226 - RFC 3229
+  HAS_BODY = true
+end
 
 class Net::HTTPMultipleChoices < Net::HTTPRedirection    # 300
   HAS_BODY = true
@@ -218,6 +220,7 @@ class Net::HTTPResponse https://github.com/ruby/ruby/blob/trunk/lib/net/http/responses.rb#L220
     '205' => Net::HTTPResetContent,
     '206' => Net::HTTPPartialContent,
     '207' => Net::HTTPMultiStatus,
+    '226' => Net::HTTPIMUsed,
 
     '300' => Net::HTTPMultipleChoices,
     '301' => Net::HTTPMovedPermanently,
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb	(revision 44078)
+++ lib/net/http.rb	(revision 44079)
@@ -334,6 +334,7 @@ module Net   #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L334
   #   HTTPResetContent::                    205
   #   HTTPPartialContent::                  206
   #   HTTPMultiStatus::                     207
+  #   HTTPIMUsed::                          226
   # HTTPRedirection::                    3xx
   #   HTTPMultipleChoices::                 300
   #   HTTPMovedPermanently::                301

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]