[#81492] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — normalperson@...
Issue #13618 has been reported by normalperson (Eric Wong).
12 messages
2017/06/01
[#88695] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/08/27
> https://bugs.ruby-lang.org/issues/13618
[#81569] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
3 messages
2017/06/04
[#81581] [Ruby trunk Bug#13632] Not processable interrupt queue for a thread after it's notified that FD is closed in some other thread. — sir.nickolas@...
Issue #13632 has been reported by nvashchenko (Nikolay Vashchenko).
4 messages
2017/06/05
[#81590] Re: [ruby-cvs:66197] ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures. — Eric Wong <normalperson@...>
ko1@ruby-lang.org wrote:
5 messages
2017/06/06
[#81591] Re: [ruby-cvs:66197] ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures.
— Eric Wong <normalperson@...>
2017/06/06
Eric Wong <normalperson@yhbt.net> wrote:
[#81596] Re: [ruby-cvs:66203] Re: Re: ko1:r59023 (trunk): revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures.
— Eric Wong <normalperson@...>
2017/06/06
Eric Wong <normalperson@yhbt.net> wrote:
[#81825] [Ruby trunk Feature#13697] [PATCH]: futex based thread primitives — normalperson@...
Issue #13697 has been reported by normalperson (Eric Wong).
3 messages
2017/06/29
[ruby-core:81583] [Ruby trunk Bug#12642] Net::HTTP populates host header incorrectly when using an IPv6 Address
From:
anuraguniyal@...
Date:
2017-06-05 21:32:04 UTC
List:
ruby-core #81583
Issue #12642 has been updated by anuraguniyal (anurag uniyal).
Below monkey patching code works for me. Is there a better way?
~~~ ruby
module MonkeyPatch
module Net
module HTTP
end
end
end
module MonkeyPatch::Net::HTTP
# workaround for https://bugs.ruby-lang.org/issues/12642
# Ruby does not pass Host header with brackets if host is ipv6 address
def addr_port
addr = address()
# if it is ipv6 add brackets around it
if addr =~ Resolv::IPv6::Regex
addr = "[#{addr}]"
end
if use_ssl?
addr + (port == Net::HTTP.https_default_port ? '' : ":#{port()}")
else
addr + (port == Net::HTTP.http_default_port ? '' : ":#{port()}")
end
end
end
Net::HTTP.prepend(MonkeyPatch::Net::HTTP)
~~~
----------------------------------------
Bug #12642: Net::HTTP populates host header incorrectly when using an IPv6 Address
https://bugs.ruby-lang.org/issues/12642#change-65287
* Author: dcorbin (David Corbin)
* Status: Assigned
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* 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 (1.17 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>