Project

General

Profile

Bug #6700

[PATCH] Fix some 4xx status classes to inherit correctly from Net::HTTPClientError

Added by Mark Dodwell about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
ruby -v:
ruby 2.0.0dev (2012-07-05 trunk 36311) [x86_64-darwin11.4.2]
[ruby-core:46189]

Description

These recently added 4xx status classes were inheriting from Net::HTTPSuccess, which seems incorrect.

I believe they should inherit from Net::HTTPClientError, as with all the other 4xx cases.

Note that this change subtly alters/fixes the behavior of these classes since they will now inherit the EXCEPTION_TYPE = Net::HTTPServerException from Net::HTTPClientError which they would not have had previously. I expect that's disable, but just wanted to flag that.

0001-Fix-4xx-classes-to-inherit-correctly-from-Net-HTTPCl.patch View (1.56 KB) Mark Dodwell, 07/05/2012 06:49 AM

Associated revisions

Revision 36316
Added by Akinori MUSHA about 4 years ago

  • lib/net/http/responses.rb: Fix 4xx classes to inherit correctly from Net::HTTPClientError. [Bug #6700]

Revision 36316
Added by Akinori MUSHA about 4 years ago

  • lib/net/http/responses.rb: Fix 4xx classes to inherit correctly from Net::HTTPClientError. [Bug #6700]

Revision 36316
Added by Akinori MUSHA about 4 years ago

  • lib/net/http/responses.rb: Fix 4xx classes to inherit correctly from Net::HTTPClientError. [Bug #6700]

History

#1 [ruby-core:46190] Updated by Mark Dodwell about 4 years ago

s/disable/desirable/

#2 [ruby-core:46192] Updated by Akinori MUSHA about 4 years ago

  • Status changed from Open to Assigned
  • Assignee set to Akinori MUSHA

#3 Updated by Akinori MUSHA about 4 years ago

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

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


  • lib/net/http/responses.rb: Fix 4xx classes to inherit correctly from Net::HTTPClientError. [Bug #6700]

#4 [ruby-core:46193] Updated by Akinori MUSHA about 4 years ago

Thanks for pointing it out. I merged your patch and added a test.

Also available in: Atom PDF