[#79914] [Ruby trunk Bug#13282] opt_str_freeze does not always dedupe — normalperson@...
Issue #13282 has been reported by Eric Wong.
4 messages
2017/03/05
[#80140] [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) — shyouhei@...
Issue #13295 has been updated by shyouhei (Shyouhei Urabe).
5 messages
2017/03/13
[#80362] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— Eric Wong <normalperson@...>
2017/03/26
[email protected] wrote:
[#80368] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— SASADA Koichi <ko1@...>
2017/03/27
On 2017/03/26 15:16, Eric Wong wrote:
[#80205] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint — Eric Wong <normalperson@...>
[email protected] wrote:
4 messages
2017/03/17
[#80213] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint
— Martin J. Dürst <duerst@...>
2017/03/17
Hello Eric,
[#80290] [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch — normalperson@...
Issue #13355 has been reported by normalperson (Eric Wong).
4 messages
2017/03/23
[#80410] Re: [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch
— Eric Wong <normalperson@...>
2017/03/27
[email protected] wrote:
[#80415] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
5 messages
2017/03/28
[#80488] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
4 messages
2017/03/29
[ruby-core:80164] [Ruby trunk Bug#12642] Net::HTTP populates host header incorrectly when using an IPv6 Address
From:
git@...
Date:
2017-03-14 22:57:30 UTC
List:
ruby-core #80164
Issue #12642 has been updated by andy (Andy Brody). File ipv6_test.rb added # Missing brackets from Host header for IPv6 addresses This is a regression from Ruby 2.1. The bug appears to have been introduced in ruby 2.2.0 by this commit: https://github.com/ruby/ruby/commit/70a2eb63999265ff7e8d46d1f5b410c8ee3d30d7 The change was added in response to this bug: https://bugs.ruby-lang.org/issues/10054 Attached is a test script demonstrating the bug "`ipv6_test.rb`". Correct behavior (present in 2.0 from 2.0.0-p643 onward and in 2.1 from 2.1.6 onward) for sending a request to `http://[::1]:8080` ~~~ Host: [::1]:8080 ~~~ Incorrect behavior (present in 2.2.0 through trunk) ~~~ Host: ::1:8080 ~~~ See also https://github.com/rest-client/rest-client/issues/583 I've added tests for rest-client that show the affected Ruby versions. `Net::HTTP` support for IPv6 URIs was broken in 2.0 before 2.0.0-p643 and 2.1 before 2.1.6, so there is a narrow window of versions that work. Full test output is here: https://travis-ci.org/rest-client/rest-client/builds/211090377 # Broken handling of explicit IPv6 Host header There is a separate bug that makes it impossible to explicitly set an IPv6 host header in affected ruby versions. Because Net::HTTP slices the end of the provided Host header after the first `:`, an IPv6 Host header will be rendered invalid. If you attempt to set `req['Host'] = '[::1]:8080'`, it will be rendered as `[` due to https://github.com/ruby/ruby/blob/v2_4_0/lib/net/http/generic_request.rb#L144 ~~~ $ ruby ipv6_test.rb --set-host /versions/2.3.1/lib/ruby/2.3.0/uri/generic.rb:595:in `check_host': bad component(expected host component): [ (URI::InvalidComponentError) from /versions/2.3.1/lib/ruby/2.3.0/uri/generic.rb:636:in `host=' from /versions/2.3.1/lib/ruby/2.3.0/net/http/generic_request.rb:151:in `update_uri' from /versions/2.3.1/lib/ruby/2.3.0/net/http.rb:1493:in `begin_transport' from /versions/2.3.1/lib/ruby/2.3.0/net/http.rb:1433:in `transport_request' from /versions/2.3.1/lib/ruby/2.3.0/net/http.rb:1407:in `request' from ipv6_test.rb:42:in `block in <main>' from /versions/2.3.1/lib/ruby/2.3.0/net/http.rb:853:in `start' ~~~ ---------------------------------------- Bug #12642: Net::HTTP populates host header incorrectly when using an IPv6 Address https://bugs.ruby-lang.org/issues/12642#change-63602 * Author: dcorbin (David Corbin) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- When sending a request, the client code adds a "Host" header. It does the by taking the given address, appending a colon, and then appending the port. This creates a fragment of a URL such as "google.com:80". However, when instead of "google.com", the address is an IPv6 address is given (such as 8383:3223::1333:DE12), simply appending a colon is not adequate. It yields 8383:3223::1333:DE12:80, which is hard to parse mess. RFC3986 stipulates that the host should be surrounded by square brackets, which would have the Host header as: [8383:3223::1333:DE12]:80. ---Files-------------------------------- ipv6_test.rb (985 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>