Feature #6569

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

Added by Akinori MUSHA about 3 years ago. Updated about 3 years ago.

[ruby-core:45547]
Status:Closed
Priority:Normal
Assignee:Yui NARUSE

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 Magnifier (8.25 KB) Akinori MUSHA, 06/12/2012 01:15 AM

Associated revisions

Revision 36068
Added by Akinori MUSHA about 3 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 Akinori MUSHA about 3 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 Akinori MUSHA about 3 years ago

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

#2 Updated by Akinori MUSHA about 3 years ago

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

#3 Updated by Yui NARUSE about 3 years ago

  • Assignee set to 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 Updated by Akinori MUSHA about 3 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 Akinori MUSHA about 3 years ago

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

#7 Updated by Akinori MUSHA about 3 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