From: merch-redmine@... Date: 2019-06-27T22:27:04+00:00 Subject: [ruby-core:93392] [Ruby trunk Bug#12055] `NET::HTTPResponse` is not deflating responses with custom `Content-Range` header Issue #12055 has been updated by jeremyevans0 (Jeremy Evans). Assignee set to naruse (Yui NARUSE) Status changed from Open to Assigned ---------------------------------------- Bug #12055: `NET::HTTPResponse` is not deflating responses with custom `Content-Range` header https://bugs.ruby-lang.org/issues/12055#change-78926 * Author: ggcampinho (Glauber Campinho) * Status: Assigned * Priority: Normal * Assignee: naruse (Yui NARUSE) * Target version: * ruby -v: 2.1.6, 2.2.4 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 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]]. 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]]. In the patch I changed it to check if the `Content-Range` unit is `bytes` and there is a test to reproduce the error. ---Files-------------------------------- custom_content_range.patch (1.87 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: