Age | Commit message (Collapse) | Author |
|
ref https://github.com/ruby/ruby/commit/da0f67c0383f57129c7a76255964b1ee739d8db8
https://github.com/ruby/net-http/commit/dbeb5f1c8f
|
|
Use `include?` instead.
https://github.com/ruby/net-http/commit/05022744a9
|
|
https://github.com/ruby/net-http/commit/843d4548de
|
|
Server Name Indication does not allow IP addresses (RFC 6066, section 3:
`Literal IPv4 and IPv6 addresses are not permitted in "HostName".`).
Recent versions of LibreSSL enforce this restriction, which raises
when setting the hostname to an IP address (s.hostname=), before
attempting to setup the SSL connection.
Since the certificate used in the test is already for localhost,
we cannot connect to localhost. However, as all the test does is
check for a specific exception, just modify the regexp used so it
handles both cases.
https://github.com/ruby/net-http/commit/6ab399db45
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
https://github.com/ruby/net-http/commit/ca7bb8c51c
|
|
https://github.com/ruby/ruby/commit/52ab9bbee918c63faad32e3851b162691b984d40 makes a failure.
```
1) Failure:
HTTPRequestTest#test_initialize_HEAD [/tmp/ruby/v3/src/trunk/test/net/http/test_http_request.rb:53]:
<{"accept"=>["*/*"], "user-agent"=>["Ruby"]}> expected but was
<{"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
"accept"=>["*/*"],
"user-agent"=>["Ruby"]}>.
```
I'm not sure it is correct, so please review later.
|
|
The last_communicated timestamp is for HTTP persistent connection, to
decide whether the current TCP connection may be reused for the
subsequent requests or not. Naturally, the timer must be reset if the
connection is recreated since it is no longer relevant.
https://github.com/ruby/net-http/commit/0a013de42d
|
|
https://github.com/ruby/net-http/commit/5bb14fd3bc
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4691
|
|
The existing implementation of `Net::HTTP#write_timeout` relies on
`Net::BefferedIO` to trigger the `Net::WriteTimeout` error. This commit
changes `send_request_with_body_stream` to remove the optimization that
was making `Net::HTTP#write_timeout` not work when `body_stream` is
used.
Open issue:
https://bugs.ruby-lang.org/issues/17933
https://github.com/ruby/net-http/commit/a0fab1ab52
|
|
It is not used in net/http library code since commit 15ccd0118c13
(r36473 in ruby svn trunk, 2012).
require's in test suite are also cleaned up.
https://github.com/ruby/net-http/commit/996d18a43f
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4424
|
|
|
|
If someone sets an env variable defining a http_proxy, containing a
username / password with percent-encoded characters, then the resulting
base64 encoded auth header will be wrong.
For example, suppose a username is `Y\X` and the password is `R%S] ?X`.
Properly URL encoded the proxy url would be:
http://Y%5CX:R%25S%5D%20%3FX@proxy.example:8000
The resulting proxy auth header should be: `WVxYOlIlU10gP1g=`, but the
getters defined by ruby StdLib `URI` return a username `Y%5CX` and
password `R%25S%5D%20%3FX`, resulting in `WSU1Q1g6UiUyNVMlNUQlMjAlM0ZY`.
As a result the proxy will deny the request.
Please note that this is my first contribution to the ruby ecosystem, to
standard lib especially and I am not a ruby developer.
References:
- https://gitlab.com/gitlab-org/gitlab/-/issues/289836
- https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/58461
- https://bugs.ruby-lang.org/issues/17542
https://github.com/ruby/net-http/commit/e57d4f38aa
|
|
```
.../ruby/test/net/http/test_httpresponse.rb:81: warning: constant RubyVM::MJIT is deprecated
```
|
|
https://github.com/ruby/net-http/commit/abc6ea1877
|
|
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.
[Feature #17490]
|
|
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
|
|
The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
`[SERVER_CERT]` after 1.1.1h.
|
|
... depending upon the environment.
|
|
On some environments that uses OpenSSL 1.1.1h, the two tests now fail.
http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true
```
1) Failure:
TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was
<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">.
```
Not sure why, but verify_callback now seems to receive only SERVER_CERT
but not CA_CERT.
It would be good to investigate the issue furthermore, but tentatively,
I want to stop the failures.
|
|
https://github.com/ruby/net-http/commit/5ae9620fbc
|
|
invalid_servername is not a valid name in an SSL request due to
the use of the underscore, and LibreSSL 3.2.0 will raise an
exception for this. These tests are not testing the allowed
characters in the server name, but how net/http handles cases where
the server name provided does not match the IP address you are
trying to connect to, so I think it's better to just modify the
tests to use a correct format.
While here, fix a typo in a test name, and use better code in the
ensure block so the same test doesn't issue both a failure and an
error.
https://github.com/ruby/net-http/commit/0e8dc91120
|
|
|
|
It failed again
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3018488
|
|
This tries to fix a random failure like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3017837
|
|
The test fails randomly on the CI of OpenCSW SPARC Solaris 10:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20200321T091909Z.fail.html.gz
```
1) Failure:
TestNetHTTP_v1_2_chunked#test_timeout_during_HTTP_session [/export/home/rubyci/unstable10s/tmp/build/20200321T091909Z/ruby/test/net/http/test_http.rb:575]:
[Net::ReadTimeout] exception expected, not #<Net::OpenTimeout: execution expired>.
```
The environment uses RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE=20, so the open
timeout 0.1 sec. means 2.0 sec. for the environment, but it seems too
strict because the environment is painfully slow.
|
|
* Let Net::HTTP.get take request headers
* Add more test cases for no header usages
* Add examples with request headers
* Add a NEWS entry [ci skip]
[Feature #16686]
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
test/net/http/test_https.rb: rename fixture methods to read_fixture
because it conflicts with test-unit gem.
|
|
According to https://github.com/ruby/openssl/pull/60,
> Currently an user who wants to do the hostname verification needs to
call SSLSocket#post_connection_check explicitly after the TLS connection
is established.
if an user who wants to skip the hostname verification,
SSLSocket#post_connection_check doesn't need to be called
https://bugs.ruby-lang.org/issues/16555
|
|
This reverts commit 5105240b1e851410020b3b3f1a2bead7ffdd4291.
In RFC 2616:
```
deflate
The "zlib" format defined in RFC 1950 [31] in combination with
the "deflate" compression mechanism described in RFC 1951 [29].
```
So "Content-Encoding: deflate" means zlib format, not raw deflate.
[Bug #11268]
|
|
Net::HTTP had used `Zlib::Inflate.new(32 + Zlib::MAX_WBITS)` for all
content encoding (deflate, zlib, and gzip).
But the argument `32 + Zlib::MAX_WBITS` means zlib and gzip decoding
with automatic header detection, so (raw) deflate compression had not
been supported.
This change makes it support raw deflate correctly by passing an
argument `-Zlib::MAX_WBITS` (which means raw deflate) to
`Zlib::Inflate.new`. All deflate-mode tests are fixed too.
[Bug #11268]
|
|
54072e329cab7207fba133caba4fc12b45add8f9
|
|
Because the test fails under HTTP proxy settings.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20191210T000004Z.fail.html.gz
```
1) Failure:
TestNetHTTPS#test_get_SNI_failure [/export/home/users/chkbuild/cb-gcc/tmp/build/20191210T000004Z/ruby/test/net/http/test_https.rb:81]:
[OpenSSL::SSL::SSLError] exception expected, not #<Net::HTTPServerException: 403 "Forbidden">.
```
The new SNI feature introduced at 54072e329c may need to be improved for
HTTP proxy environment.
|
|
to replace the address for TCP/IP connection [Feature #5180]
There're 3 layers of hostname:
* host address for TCP/IP
* TLS server name
* HTTP Host header value
To test DNS round robin or check server certificate from server local,
people sometimes want to connect server with given IP address but keep
TLS server name and HTTP Host header value.
closes [Feature #15215]
closes https://github.com/ruby/ruby/pull/1893
closes https://github.com/ruby/ruby/pull/1977
|
|
An EPIPE when sending the request should be ignored. Even if you
cannot write more data, you may still be able to read the server's
response.
Fixes [Bug #14466]
Notes:
Merged: https://github.com/ruby/ruby/pull/2494
|
|
A new exception is raised if an URI::HTTP is received and that object doesn't
have a hostname property.
Complementary to #1278
|
|
|
|
* lib/net/http/header.rb: show the caller's location instead of
the current lines.
|
|
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190610T071910Z.log.html.gz
|
|
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190605T231909Z.fail.html.gz
|
|
to prevent send Host header twice accidentally.
From: Sangyong Sim <sangyong-sim@cookpad.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Due to a bug in OpenSSL 1.1.0h[1] (it's only in this specific version;
it was introduced just before the release and is already fixed in their
stable branch), the callback set by SSLContext#session_new_cb= does not
get called for clients, making net/http and net/ftp not attempt session
resumption.
Let's disable the affected test cases for now. Another option would be
to fallback to using SSLSocket#session as we did before r64234. But
since only a single version is affected and hopefully a new stable
version containing the fix will be released in near future, I chose not
to add such workaround code to lib/.
[1] https://github.com/openssl/openssl/pull/5967
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
When TLS 1.3 is in use, the session ticket may not have been sent yet
even though a handshake has finished. Also, the ticket could change if
multiple session ticket messages are sent by the server. Use
SSLContext#session_new_cb instead of calling SSLSocket#session
immediately after a handshake. This way also works with earlier protocol
versions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
To try to block writing on travis.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
This change adds testcases for Response#inspect and #code_type, and
improves line coverage of lib/net/http/response.rb (91.8 % to 92.94 %).
A patch from @owlworks. https://github.com/ruby/ruby/pull/1898
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|