lib/net/http/status.rb in net-http-0.3.2 vs lib/net/http/status.rb in net-http-0.4.0
- old
+ new
@@ -2,11 +2,11 @@
require_relative '../http'
if $0 == __FILE__
require 'open-uri'
- IO.foreach(__FILE__) do |line|
+ File.foreach(__FILE__) do |line|
puts line
break if line.start_with?('end')
end
puts
puts "Net::HTTP::STATUS_CODES = {"
@@ -14,11 +14,11 @@
URI(url).read.each_line do |line|
code, mes, = line.split(',')
next if ['(Unused)', 'Unassigned', 'Description'].include?(mes)
puts " #{code} => '#{mes}',"
end
- puts "}"
+ puts "} # :nodoc:"
end
Net::HTTP::STATUS_CODES = {
100 => 'Continue',
101 => 'Switching Protocols',
@@ -53,19 +53,20 @@
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
- 413 => 'Payload Too Large',
+ 413 => 'Content Too Large',
414 => 'URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Range Not Satisfiable',
417 => 'Expectation Failed',
421 => 'Misdirected Request',
- 422 => 'Unprocessable Entity',
+ 422 => 'Unprocessable Content',
423 => 'Locked',
424 => 'Failed Dependency',
+ 425 => 'Too Early',
426 => 'Upgrade Required',
428 => 'Precondition Required',
429 => 'Too Many Requests',
431 => 'Request Header Fields Too Large',
451 => 'Unavailable For Legal Reasons',
@@ -76,8 +77,8 @@
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
508 => 'Loop Detected',
- 510 => 'Not Extended',
+ 510 => 'Not Extended (OBSOLETED)',
511 => 'Network Authentication Required',
-}
+} # :nodoc: