Project

General

Profile

Bug #12055

`NET::HTTPResponse` is not deflating responses with custom `Content-Range` header

Added by ggcampinho (Glauber Campinho) over 3 years ago. Updated about 2 months ago.

Status:
Assigned
Priority:
Normal
Target version:
-
[ruby-core:73710]

Description

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) custom_content_range.patch ggcampinho (Glauber Campinho), 02/05/2016 01:30 PM

Related issues

Is duplicate of Ruby master - Bug #11450: HTTPHeader.content_range throws error on non-byte unitsOpenActions

History

#1

Updated by ggcampinho (Glauber Campinho) over 3 years ago

  • File deleted (custom_content_range.patch)

Updated by ggcampinho (Glauber Campinho) over 3 years ago

Hi! Any thoughts here?

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Assignee set to naruse (Yui NARUSE)
  • Status changed from Open to Assigned
#6

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Is duplicate of Bug #11450: HTTPHeader.content_range throws error on non-byte units added

Also available in: Atom PDF