Project

General

Profile

Bug #12055

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

The RFC 7233, section 4.2 describes the the possibility of using a custom `Content-Range` header and not only for bytes https://tools.ietf.org/html/rfc7233#section-4.2. [[https://tools.ietf.org/html/rfc7233#section-4.2]]. Although, the `NET::HTTPResponse` considers that `Content-Range` present on the response during the inflating is in `bytes` unit. 

 This issue is caused by this line https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L252. [[https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L252]]. In the patch I changed it to check if the `Content-Range` unit is `bytes` and there is a test to reproduce the error. 

Back