Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13058
|
|
https://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20250403T060004Z.fail.html.gz
Notes:
Merged: https://github.com/ruby/ruby/pull/13058
|
|
The shutdown process here attempted to terminate the test server
by interrupting it with Thread#kill, and then proceeded to close
the server and join the thread. The kill does indeed interrupt
the accept call, but the close call could also interrupt the
thread as part of notifying blocked threads waiting on that
socket call.
In JRuby, where all of this can happen at the same time, it leads
to the following scenario:
* The server thread enters TCPServer#accept and blocks.
* The main thread calls Thread#kill to interrupt the accept call.
* The server thread wakes up and starts to propagate the kill.
There is a slight delay between this wakeup and removing the
server thread from the TCPServer's blocked threads list.
* The main thread calls TCPServer#close, which sees that the server
thread is still in the blocked list, so it initiates a second
interrupt to raise IOError "closed in another thread" on the
server thread.
* As the kill is bubbling out, another check for interrupts occurs,
causing it to see the new raise interrupt and propagate that
instead of the active kill.
* Because the server is now closed and the rescue here is empty,
the server loop will endlessly attempt and fail to call accept.
I was unable to determine how CRuby avoids this race. There may be
code that prevents an active kill interrupt from triggering
further interrupts.
In order to get these tests running on JRuby, I've made the
following changes:
* Only kill the thread; one interrupt is sufficient to break it
out of the accept call.
* Ensure outside the server loop that the server gets closed. This
happens within the server thread, so triggers no new interrupts.
* Minor cleanup for the pattern of using @ssl_server or @server.
This change avoids the race in JRuby (and possibly other parallel-
threaded implementations) and does not impact the behavior of the
tests.
https://github.com/ruby/net-http/commit/54025b3870
|
|
Do not wait Connection Attempt Delay without in progress fds
Reset Connection Attempt Delay when connection fails and there is no other socket connection in progress.
This is intended to resolve an issue that was temporarily worked around in Pull Request #12062.
`TCPServer::new` (used in tests such as `TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write`) can only connect over either IPv6 or IPv4, depending on the environment.
Since HEv2 attempts to connect over IPv6 first, environments where IPv6 connections are unavailable return ECONNREFUSED immediately.
In such cases, the client should immediately retry the connection over IPv4.
However, HEv2 includes a specification for a "Connection Attempt Delay," where it waits 250ms after the previous connection attempt before starting the next one.
This delay causes Net::OpenTimeout (100ms) to be exceeded while waiting for the next connection attempt to start.
With this change, when a connection attempt fails, if there are sockets still attempting to connect and there are addresses yet to be tried, the Connection Attempt Delay will be resetted, allowing the next connection attempt to start immediately.
---
Additionally, the following minor fixes have been made:
- The `nfds` value used for select(2) is now reset with each wait.
Notes:
Merged-By: shioimm <[email protected]>
|
|
with a TCPSoerver that is only listening
to avoid AssertionFailedError on Ubuntu.
---
The tests such as
`TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write`
expect to raise a `Net::WriteTimeout` due to a failure in writing to the server.
However, on Ubuntu environments,
the server immediately returns a "Connection Refused" in such cases.
The socket created with `TCPSocket.new` that supports HEv2 catches this immediately
and raises a `Net::OpenTimeout`.
As a result, these tests fail due to raising a different exception than expected.
This PR adds `Net::OpenTimeout` asexceptions to avoid these test failures.
Notes:
Merged-By: shioimm <[email protected]>
|
|
```
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:32: warning: assigned but unused variable - e
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:61: warning: assigned but unused variable - version
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:124: warning: method redefined; discarding old query
```
https://github.com/ruby/net-http/commit/6f818346ce
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11273
|
|
https://github.com/ruby/net-http/commit/ddb2a81aed
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11171
|
|
```
Leaked file descriptor: HTTPSProxyTest#test_https_proxy_ssl_connection: 8 : #<TCPServer:fd 8, AF_INET, 127.0.0.1, 63104>
```
Notes:
Merged: https://github.com/ruby/ruby/pull/11171
|
|
http://rubyci.s3.amazonaws.com/rhel9/ruby-master/log/20240711T213004Z.fail.html.gz
```
1) Error:
HTTPSProxyTest#test_https_proxy_ssl_connection:
OpenSSL::X509::CertificateError: invalid digest
/home/chkbuild/chkbuild/tmp/build/20240711T213004Z/ruby/test/net/http/test_https_proxy.rb:63:in 'OpenSSL::X509::Certificate#sign'
/home/chkbuild/chkbuild/tmp/build/20240711T213004Z/ruby/test/net/http/test_https_proxy.rb:63:in 'HTTPSProxyTest#test_https_proxy_ssl_connection'
```
|
|
https://bugs.ruby-lang.org/issues/16482
https://github.com/ruby/net-http/commit/ae2d83f88b
|
|
https://github.com/ruby/net-http/commit/fed3dcd0c2
|
|
https://github.com/ruby/net-http/commit/5544243c41
|
|
|
|
https://github.com/ruby/net-http/commit/6376592cb4
|
|
https://github.com/ruby/net-http/commit/d867edc0fe
|
|
continuouse POST request
https://github.com/ruby/net-http/commit/54a99b9f0c
|
|
https://github.com/ruby/net-http/commit/205bac757a
|
|
and 127.0.0.1 both
https://github.com/ruby/net-http/commit/749a1b3197
|
|
multipart/form-data
https://github.com/ruby/net-http/commit/b38c2795a9
|
|
https://github.com/ruby/net-http/commit/9c16c383ce
|
|
https://github.com/ruby/net-http/commit/f00d198433
|
|
OpenSSL::SSL::SSLServer
https://github.com/ruby/net-http/commit/b01bcf6d7f
|
|
OpenSSL 3.3.0 9 Apr 2024 is also broken.
Signed-off-by: Xi Ruoyao <[email protected]>
https://github.com/ruby/net-http/commit/ab525c956d
|
|
* OpenSSL 3.2.1 30 Jan 2024 is also broken
Import 45064610725ddd81a5ea3775da35aa46985bc789 from ruby_3_3 branch
tentatively.
|
|
|
|
If a socket error occurs while performing a streaming download via
the response block provided to transport_request, avoid calling
the response block again as this would result in duplicate data
received by the client.
Fixes https://github.com/ruby/net-http/pull/86
Fixes https://github.com/ruby/net-http/pull/87
Fixes [Bug #11526]
https://github.com/ruby/net-http/commit/114d01b092
Co-authored-by: Jeremy Stanley <[email protected]>
|
|
The private key is replaced with a public known test key published at
[RFC 9500].
Also lifetime has been extended to 10 years from 4 years.
[RFC 9500]: https://www.rfc-editor.org/rfc/rfc9500.html
https://github.com/ruby/net-http/commit/4ab6c4a500
|
|
|
|
This started to reliably fail on MinGW at an irrelevant commit:
https://github.com/ruby/ruby/actions/runs/6981002841/job/18997302124
https://github.com/ruby/ruby/actions/runs/6981946473/job/19000104223
https://github.com/ruby/ruby/actions/runs/6983823136/job/19005613809
https://github.com/ruby/ruby/actions/runs/6983912116/job/19005844596
https://github.com/ruby/ruby/actions/runs/6984215921/job/19006649495
https://github.com/ruby/ruby/actions/runs/6984383103/job/19007100446
https://github.com/ruby/ruby/actions/runs/6986489509/job/19012000642
So this failure is not detecting a new bug. Let's skip this until we fix
this test for MinGW.
|
|
* no_proxy is meant to operate on the destination address, not on the name of the proxy
* if both end with `'.example'`, the test does not nail down the behaviour
https://github.com/ruby/net-http/commit/bb9a5cfa3d
|
|
This comment previously specified TLS 1.2, but actually set the
version to TLS 1.0. LibreSSL 3.8.1 (included in OpenBSD 7.4)
dropped support for TLS 1.0/1.1 for security reasons, which
broke this test. Switch the test to use TLS 1.2 as documented
so it will continue to work on OpenBSD 7.4+.
https://github.com/ruby/net-http/commit/97be4de53a
|
|
Fix nil handling in read_body and stream_check.
Fixes: #70
https://github.com/ruby/net-http/commit/36f916ac18
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7462
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7462
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6890
|
|
Unfortunately we have to use a mock, but this test demonstrate the
mutation bug fixed in #19.
It fails on 0.2.0 but passes on 0.1.3 or 0.2.1.
https://github.com/ruby/net-protocol/commit/40a1ab687c
|
|
The error raised for broken coderanges was changed in ruby/ruby@571d21f
and the test was fixed in that commit but not ported to this repo.
ruby/net-http@e6185dda26ea6db7a3515d4f47ab231f5f4ac902
|
|
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.
In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError. However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.
Fixes [Bug #18931]
Notes:
Merged: https://github.com/ruby/ruby/pull/6282
|
|
This list is out of date. At least OpenBSD since 2013 does not
allow one user to read the environment variables of a process
run by another user.
While we could try to keep the list updated, I think it's a bad
idea to not use the user/password from the environment, even if
another user on the system could read it. If http_proxy exists
in the environment, and other users can read it, it doesn't
make it more secure for Ruby to ignore it. You could argue that
it encourages poor security practices, but net/http should provide
mechanism, not policy.
Fixes [Bug #18908]
https://github.com/ruby/net-http/commit/1e4585153d
|
|
units
* Returning nil from the `content_range` method instead of raising an
error when the unit in the content-range header is not "bytes".
Fix https://bugs.ruby-lang.org/issues/11450
https://github.com/ruby/net-http/commit/0b5030dd86
Co-Authored-By: Nobuyoshi Nakada <[email protected]>
|
|
This reverts commit 63546bfc1581d4abec2a0d846106a1c0afc0efa9.
|
|
* Added a nil check in Net::HTTPHeader#initialize_http_header for keys in the header that do not have any value
* Returning nil from the content_range method instead of raising an error when the unit in the content-range header is not bytes
* Modified initialize_http_header to match trunk
fix [Bug #11450]
fix https://github.com/ruby/ruby/pull/1018
Notes:
Merged-By: nurse <[email protected]>
|
|
Handle missing session_new_cb= and do not call
session_cache_mode=, as JRuby SSL does not support
these methods.
https://github.com/ruby/net-http/commit/3237ef4d8c
|
|
The ignore_eof setting on HTTPResponse makes it so an EOFError is
raised when reading bodies with a defined Content-Length, if the
body read was truncated due to the socket be closed.
The ignore_eof setting on HTTP sets the values used in responses
that are created by the object.
For backwards compatibility, the default is for both settings is
true. However, unless you are specifically tested for and handling
truncated responses, it's a good idea to set ignore_eof to false so
that errors are raised for truncated responses, instead of those
errors silently being ignored.
Fixes [Bug #14972]
https://github.com/ruby/net-http/commit/4d47e34995
|
|
Previously, the content-encoding header was removed and the body
was modified, but the content-length header was not modified,
resulting in the content-length header not matching the body
length.
Don't delete content-length before yielding inflate body, as that
causes a switch to read the entire body instead of reading in
chunks.
Fixes [Bug #16672]
https://github.com/ruby/net-http/commit/58284e9710
Co-authored-by: st0012 <[email protected]>
|
|
encoding
This allows for the ability to opt-in to a method to set the
encoding of response bodies. By setting the accessor to a String
or Encoding instance, it will use the specified encoding.
Setting the value of true will try to detect the encoding of the
response body, either using the Content-Type header (assuming it
specifies charset) or by scanning for a <meta> tag in the document
that specifies the encoding. The default is false in which case
no forcing of encoding will be done (same as before the patch).
Implements [Feature #2567]
Implements [Feature #15517]
https://github.com/ruby/net-http/commit/6233e6b7c1
Co-authored-by: Yui Naruse <[email protected]>
|
|
This reverts commit https://github.com/ruby/net-http/commit/a7cb30124cf1.
This is causing errors in Ruby's CI, will revert for now and
try again after testing a fix with Ruby's CI.
https://github.com/ruby/net-http/commit/7b852b1feb
|
|
Previously, the content-encoding header was removed and the body
was modified, but the content-length header was not modified,
resulting in the content-length header not matching the body
length.
Fixes [Bug #16672]
https://github.com/ruby/net-http/commit/a7cb30124c
|