ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:69670] [Ruby trunk - Bug #11285] [Open] Net::HTTP should handle content-coding with case-insensitive
       [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
@ 2015-06-18 23:38 ` andy.chu
  2015-06-29 16:52 ` [ruby-core:69774] [Ruby trunk - Bug #11285] " nagachika00
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: andy.chu @ 2015-06-18 23:38 UTC (permalink / raw)
  To: ruby-core

Issue #11285 has been reported by Andy Chu.

----------------------------------------
Bug #11285: Net::HTTP should handle content-coding with case-insensitive 
https://bugs.ruby-lang.org/issues/11285

* Author: Andy Chu
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When Ruby Net::HTTP sent a request. It by default set the content to be compress with header: Accept-Encoding

But if server return with content-encoding = GZIP (or any case other then all lower case) it will not tread the body as compressed.

According to HTTP 1.1 spec, Content-Encoding should be value used by content-coding, and the value of content-coding should be case-insensitive
content-coding: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5

I think simply change the code here: https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L253

from

case self['content-encoding']

to 

case self['content-encoding'].downcase

should work





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:69774] [Ruby trunk - Bug #11285] Net::HTTP should handle content-coding with case-insensitive
       [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
  2015-06-18 23:38 ` [ruby-core:69670] [Ruby trunk - Bug #11285] [Open] Net::HTTP should handle content-coding with case-insensitive andy.chu
@ 2015-06-29 16:52 ` nagachika00
  2015-06-29 16:53 ` [ruby-core:69775] " nagachika00
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2015-06-29 16:52 UTC (permalink / raw)
  To: ruby-core

Issue #11285 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED

----------------------------------------
Bug #11285: Net::HTTP should handle content-coding with case-insensitive 
https://bugs.ruby-lang.org/issues/11285#change-53152

* Author: Andy Chu
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
When Ruby Net::HTTP sent a request. It by default set the content to be compress with header: Accept-Encoding

But if server return with content-encoding = GZIP (or any case other then all lower case) it will not tread the body as compressed.

According to HTTP 1.1 spec, Content-Encoding should be value used by content-coding, and the value of content-coding should be case-insensitive
content-coding: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5

I think simply change the code here: https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L253

from

case self['content-encoding']

to 

case self['content-encoding'].downcase

should work





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:69775] [Ruby trunk - Bug #11285] Net::HTTP should handle content-coding with case-insensitive
       [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
  2015-06-18 23:38 ` [ruby-core:69670] [Ruby trunk - Bug #11285] [Open] Net::HTTP should handle content-coding with case-insensitive andy.chu
  2015-06-29 16:52 ` [ruby-core:69774] [Ruby trunk - Bug #11285] " nagachika00
@ 2015-06-29 16:53 ` nagachika00
  2015-08-10 16:47 ` [ruby-core:70314] " nagachika00
  2015-08-17  7:50 ` [ruby-core:70410] " usa
  4 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2015-06-29 16:53 UTC (permalink / raw)
  To: ruby-core

Issue #11285 has been updated by Tomoyuki Chikanaga.


memo: r51063 is required too.

----------------------------------------
Bug #11285: Net::HTTP should handle content-coding with case-insensitive 
https://bugs.ruby-lang.org/issues/11285#change-53153

* Author: Andy Chu
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
When Ruby Net::HTTP sent a request. It by default set the content to be compress with header: Accept-Encoding

But if server return with content-encoding = GZIP (or any case other then all lower case) it will not tread the body as compressed.

According to HTTP 1.1 spec, Content-Encoding should be value used by content-coding, and the value of content-coding should be case-insensitive
content-coding: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5

I think simply change the code here: https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L253

from

case self['content-encoding']

to 

case self['content-encoding'].downcase

should work





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:70314] [Ruby trunk - Bug #11285] Net::HTTP should handle content-coding with case-insensitive
       [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-06-29 16:53 ` [ruby-core:69775] " nagachika00
@ 2015-08-10 16:47 ` nagachika00
  2015-08-17  7:50 ` [ruby-core:70410] " usa
  4 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2015-08-10 16:47 UTC (permalink / raw)
  To: ruby-core

Issue #11285 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE

r51061, r51063 and r51091 were backported into `ruby_2_2` branch at r51522.

----------------------------------------
Bug #11285: Net::HTTP should handle content-coding with case-insensitive 
https://bugs.ruby-lang.org/issues/11285#change-53736

* Author: Andy Chu
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE
----------------------------------------
When Ruby Net::HTTP sent a request. It by default set the content to be compress with header: Accept-Encoding

But if server return with content-encoding = GZIP (or any case other then all lower case) it will not tread the body as compressed.

According to HTTP 1.1 spec, Content-Encoding should be value used by content-coding, and the value of content-coding should be case-insensitive
content-coding: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5

I think simply change the code here: https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L253

from

case self['content-encoding']

to 

case self['content-encoding'].downcase

should work





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:70410] [Ruby trunk - Bug #11285] Net::HTTP should handle content-coding with case-insensitive
       [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-08-10 16:47 ` [ruby-core:70314] " nagachika00
@ 2015-08-17  7:50 ` usa
  4 siblings, 0 replies; 5+ messages in thread
From: usa @ 2015-08-17  7:50 UTC (permalink / raw)
  To: ruby-core

Issue #11285 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE

ruby_2_1 r51602 merged revision(s) 51061,51063,51091.

----------------------------------------
Bug #11285: Net::HTTP should handle content-coding with case-insensitive 
https://bugs.ruby-lang.org/issues/11285#change-53816

* Author: Andy Chu
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
----------------------------------------
When Ruby Net::HTTP sent a request. It by default set the content to be compress with header: Accept-Encoding

But if server return with content-encoding = GZIP (or any case other then all lower case) it will not tread the body as compressed.

According to HTTP 1.1 spec, Content-Encoding should be value used by content-coding, and the value of content-coding should be case-insensitive
content-coding: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5

I think simply change the code here: https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L253

from

case self['content-encoding']

to 

case self['content-encoding'].downcase

should work





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-17  7:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11285.20150618233844@ruby-lang.org>
2015-06-18 23:38 ` [ruby-core:69670] [Ruby trunk - Bug #11285] [Open] Net::HTTP should handle content-coding with case-insensitive andy.chu
2015-06-29 16:52 ` [ruby-core:69774] [Ruby trunk - Bug #11285] " nagachika00
2015-06-29 16:53 ` [ruby-core:69775] " nagachika00
2015-08-10 16:47 ` [ruby-core:70314] " nagachika00
2015-08-17  7:50 ` [ruby-core:70410] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).