Project

General

Profile

Feature #6569

[PATCH] Add HTTP status codes defined in RFCs 2295, 2817, 2774, 4918 and 5842

Added by knu (Akinori MUSHA) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:45547]

Description

Currently Net::HTTP and WEBrick define status codes from RFC 2616 and 6585 but there are many others defined in RFCs besides them.

Most of these are actually used in real world applications, not to mention Rails.

0001-lib-net-http-responses.rb-lib-webrick-httpstatus.rb-.patch View (8.25 KB) knu (Akinori MUSHA), 06/12/2012 01:15 AM

Associated revisions

Revision 36068
Added by knu (Akinori MUSHA) almost 5 years ago

  • lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
    response codes added in RFCs 2817 and 4918.
    [Feature #6569]

  • lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
    Net::HTTPMultipleChoices, leaving the former as alias to the
    latter for backward compatibitily.
    [Feature #6569]

  • lib/net/http/responses.rb: Add comments about unused,
    still-in-draft and private extension response codes.
    [Feature #6569]

Revision 36068
Added by knu (Akinori MUSHA) almost 5 years ago

  • lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
    response codes added in RFCs 2817 and 4918.
    [Feature #6569]

  • lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
    Net::HTTPMultipleChoices, leaving the former as alias to the
    latter for backward compatibitily.
    [Feature #6569]

  • lib/net/http/responses.rb: Add comments about unused,
    still-in-draft and private extension response codes.
    [Feature #6569]

Revision 36068
Added by knu (Akinori MUSHA) almost 5 years ago

  • lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
    response codes added in RFCs 2817 and 4918.
    [Feature #6569]

  • lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
    Net::HTTPMultipleChoices, leaving the former as alias to the
    latter for backward compatibitily.
    [Feature #6569]

  • lib/net/http/responses.rb: Add comments about unused,
    still-in-draft and private extension response codes.
    [Feature #6569]

Revision 36068
Added by knu (Akinori MUSHA) almost 5 years ago

  • lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
    response codes added in RFCs 2817 and 4918.
    [Feature #6569]

  • lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
    Net::HTTPMultipleChoices, leaving the former as alias to the
    latter for backward compatibitily.
    [Feature #6569]

  • lib/net/http/responses.rb: Add comments about unused,
    still-in-draft and private extension response codes.
    [Feature #6569]

History

#1 Updated by knu (Akinori MUSHA) almost 5 years ago

  • File deleted (0001-lib-net-http-responses.rb-lib-webrick-httpstatus.rb-.patch)

#2 [ruby-core:45548] Updated by knu (Akinori MUSHA) almost 5 years ago

  • File 0001-lib-net-http-responses.rb-lib-webrick-httpstatus.rb-.patch added

#3 [ruby-core:45549] Updated by naruse (Yui NARUSE) almost 5 years ago

  • Assignee set to naruse (Yui NARUSE)
  • Status changed from Open to Feedback

I agree about 2817 and 4918, but others are experimental.
Could you show real applications which use such experimental RFCs?

#4 [ruby-core:45570] Updated by knu (Akinori MUSHA) almost 5 years ago

Because you say so, I'll keep 208, 506, 508 and 510 unadded until I get a proof.

Among the uncertain four, I've observed 510 responses returned from some local (Japanese) hosting services, but I'm not sure if they are generated by a widely distributed server/middleware or from the companies' in-house software.

Just for the record, status codes 506 and 510 are listed in Apache's http_protocol.c, while 208 is unlisted and 508 is marked as unused.

#6 Updated by knu (Akinori MUSHA) almost 5 years ago

  • File deleted (0001-lib-net-http-responses.rb-lib-webrick-httpstatus.rb-.patch)

#7 Updated by knu (Akinori MUSHA) almost 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36068.
Akinori, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
    response codes added in RFCs 2817 and 4918.
    [Feature #6569]

  • lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
    Net::HTTPMultipleChoices, leaving the former as alias to the
    latter for backward compatibitily.
    [Feature #6569]

  • lib/net/http/responses.rb: Add comments about unused,
    still-in-draft and private extension response codes.
    [Feature #6569]

Also available in: Atom PDF