summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
AgeCommit message (Collapse)Author
2024-01-05Bump up net-http to 0.4.1Hiroshi SHIBATA
2023-12-16merge revision(s) e3a19b8a4306ae3103e6a27cdac7482585aac453:nagachika
[ruby/net-http] Bump up 0.4.0 https://github.com/ruby/net-http/commit/4be99c204c --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2023-12-16merge revision(s) 66d266244c00c1f9ffcfbd2970386e0adcc2512a:nagachika
[ruby/net-http] Removed obsolated Revision constant https://github.com/ruby/net-http/commit/c1c5638014 --- lib/net/http.rb | 1 - 1 file changed, 1 deletion(-)
2023-12-16merge revision(s) ↵nagachika
f109269a0392940df2b314e16502c4509b94a290,14fa5e39d72c84d3e12e10dc5d77a6e6200c10f5: [ruby/net-http] fix a false-negative test * 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 --- test/net/http/test_http.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) [ruby/net-http] fix no_proxy behaviour https://github.com/ruby/net-http/commit/f4951dc42a --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2023-12-16merge revision(s) ↵nagachika
8d04260acd8b6fba98867acc1a7e786495813fa0,2fbd8dca18a102cb3ffc5e7e6235c09fd0d04ba3,4165ec91d87ff1fcb41e312d896bea8a678c9bab,4d21134f3f1645ae2042d836e750ad267ee1551f,70da92cdf7ac75e071353c4551419ad02c284497,ea321a654d4b4fd6d56a1cdd6e117c62075898ee,ae68a8df586e9f3b3211e9c174b7001e57ee6aee,af67ced3b0945e8ea67434f8e66ef1e602656438,e77c766b7ab17e801c5cfa881754c392f8c13f0b: [ruby/net-http] turn on frozen strings for net/http/header https://github.com/ruby/net-http/commit/a5203c9f92 --- lib/net/http/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] turn on frozen strings for net/http/generic_request https://github.com/ruby/net-http/commit/b92ade088d --- lib/net/http/generic_request.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) [ruby/net-http] update net/http/response to be frozen string literal https://github.com/ruby/net-http/commit/dc3b4a75ca --- lib/net/http/response.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) [ruby/net-http] freeze rest of lib https://github.com/ruby/net-http/commit/455a74734a --- lib/net/http.rb | 2 +- lib/net/http/backward.rb | 2 +- lib/net/http/exceptions.rb | 2 +- lib/net/http/proxy_delta.rb | 2 +- lib/net/http/request.rb | 2 +- lib/net/http/requests.rb | 2 +- lib/net/https.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) [ruby/net-http] Fix on 2.7 https://github.com/ruby/net-http/commit/5194fd541e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] use +'' everywhere https://github.com/ruby/net-http/commit/1077427152 --- lib/net/http/generic_request.rb | 4 ++-- lib/net/http/response.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) [ruby/net-http] Update lib/net/http/response.rb @natematykiewicz's suggestion to avoid a string allocation https://github.com/ruby/net-http/commit/925630f227 Co-authored-by: Nate Matykiewicz <natematykiewicz@gmail.com> --- lib/net/http/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Update lib/net/http.rb @natematykiewicz's suggestion to avoid another string allocation https://github.com/ruby/net-http/commit/4a22c42338 Co-authored-by: Nate Matykiewicz <natematykiewicz@gmail.com> --- lib/net/http.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) [ruby/net-http] No longer neccessary to call `String#freeze` on string literals. See #144 https://github.com/ruby/net-http/commit/5a986c13d3 --- lib/net/http.rb | 2 +- lib/net/http/generic_request.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
2023-12-16merge revision(s) ↵nagachika
1b4c1492c1704407f86af2882efebc047b9c2d26,62e2b61607c04ff0d2543f0515b2171a24e66b4e,fd0a5659cadb49f1640b20896cd750decdbbd701,c8c3431b0a5995d58f97c511ffa0a39e0f19c75e,755c379d877c66916d20840f07738d6050da3ca2,030f39822ac9d6d7dcdb639e099b320d3517c19c,2f19c5b7e080f75c3373c5b1671b4d4cfab6d334: [ruby/net-http] [DOC] What's Here for Net:HTTP (https://github.com/ruby/net-http/pull/128) https://github.com/ruby/net-http/commit/39e70f0f9b --- lib/net/http.rb | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 267 insertions(+), 2 deletions(-) Replaced non-ascii charactor. It fails version detection at `net-http.gemspec`. ># Returns the X509 certificate chain for the session<E2><80><99>s socket peer. --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Test building packages Also revert commit https://github.com/ruby/net-http/commit/d22ca54904de "Replaced non-ascii charactor. It fails version detection at `net-http.gemspec`." https://github.com/ruby/net-http/commit/fbeb247d93 --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Read in binary mode to get rid of invalid byte sequence https://github.com/ruby/net-http/commit/38de3d17a7 --- lib/net/http/net-http.gemspec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) [ruby/net-http] Exclude git related files https://github.com/ruby/net-http/commit/2767df580d --- lib/net/http/net-http.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Re-apply https://github.com/ruby/net-http/commit/d22ca54904de after testing https://github.com/ruby/net-http/commit/7ac7401a9c --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/130) https://github.com/ruby/net-http/commit/698e18cfc1 --- lib/net/http/response.rb | 53 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 17 deletions(-)
2023-12-16merge revision(s) ↵nagachika
35aba09e7f0d6b643c6446f44acdec654519ca64,8c8645f57895d97f5f3da06759c10853ba705a22,8f678d61a597fc2871031d7a38698f3dd63d8c29,44b7fd8d4fa842523813195dfb7255ce33fdf9ca,308942920f4e200468673be03c646f0645a84263,401aa9ddd1091f5b517dce37cd002bc2c37f5ac1,8250b4679453c095eab2f60d9147ca2fe4da32c6,fe7d4eed2511ff64f263d9f29cbf0dcbd4c3a026,d92289f6330c57b0fe970a654dbf33314bfd6203,3ebc80314cf1ce727dcc2ba4192ff5265d348206,5a9e2f142d9debfb44d7d23f6821b810607d9d15,3e5a77f1ae73f4a6bf7b2b868be674ab8c714c7a,faa4c2279aa018a2bb9bc09107adf8a8fcf5fd3d,6db79aefec27035583c5b236d98425748b428c49,06195e76037b500eac219b58506e34f0d852b472,a641f6422c97a72640dc295f6b1b3ec2b9da739e,2c7fe9c0a6a2cea1243dcb30e684bf8c016f1192,bc6e587e86a4a4a46af3b1c2fbe1ff3b399735a6,3c7d5ccdce5707d7964f01f974db505d5add590f,847a0df058a4adb60266213cb8db7bb537c1d09e,a49bc73e1f33e8a0e40ff0c3fef6c6fe749f8179,899fad907c32b533bb73206d5e19204e526621ba,4edb2a29f67957fc7027eaad0c08e8003cfde609,7c47c2617a091e2a7abaeff329fdef47d1f3f3f5,05f016cdad84481c084543c6fa8b32205c19431f,6e6992e5db49a238baf290d9b9b521f6b6be5a19: [ruby/net-http] Adding links to references https://github.com/ruby/net-http/commit/b85530e6b8 --- lib/net/http/responses.rb | 206 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 180 insertions(+), 26 deletions(-) [ruby/net-http] [DOC] Adding links to references (https://github.com/ruby/net-http/pull/97) https://github.com/ruby/net-http/commit/768115167a --- lib/net/http/responses.rb | 83 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 11 deletions(-) [ruby/net-http] Adding links to references https://github.com/ruby/net-http/commit/1c8151aaf3 --- lib/net/http/responses.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) [ruby/net-http] Enhanced RDoc for HTTPHeader https://github.com/ruby/net-http/commit/6a282eccdd --- lib/net/http/header.rb | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for set_form (https://github.com/ruby/net-http/pull/103) https://github.com/ruby/net-http/commit/f6506ff889 --- lib/net/http/header.rb | 152 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 102 insertions(+), 50 deletions(-) [ruby/net-http] [DOC] Header doc (https://github.com/ruby/net-http/pull/104) https://github.com/ruby/net-http/commit/3308362d9b --- lib/net/http/header.rb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) [ruby/net-http] Correct doc error https://github.com/ruby/net-http/commit/dc006d8419 --- lib/net/http/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Manually merged https://github.com/ruby/net-http/pull/106 Co-authored-by: Peter Zhu <peter@peterzhu.ca> Co-authored-by: BurdetteLamar <burdettelamar@yahoo.com> --- lib/net/http.rb | 109 +++++++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 57 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/110) https://github.com/ruby/net-http/commit/b098caa5e4 --- doc/net-http/examples.rdoc | 3 +- lib/net/http.rb | 166 +++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 91 deletions(-) [ruby/net-http] Redirection revision https://github.com/ruby/net-http/commit/9a4e2d3a2a --- lib/net/http.rb | 62 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for HTTPGenericRequest (https://github.com/ruby/net-http/pull/113) https://github.com/ruby/net-http/commit/14c8405702 --- lib/net/http/generic_request.rb | 92 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 8 deletions(-) [ruby/net-http] Remarks on inclusions https://github.com/ruby/net-http/commit/dfd060c583 --- doc/net-http/included_getters.rdoc | 3 + doc/net-http/included_setters.rdoc | 3 + lib/net/http/requests.rb | 30 ++++++++++ lib/net/http/responses.rb | 120 +++++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 doc/net-http/included_getters.rdoc create mode 100644 doc/net-http/included_setters.rdoc [ruby/net-http] [DOC] Enhanced RDoc for write_timeout (https://github.com/ruby/net-http/pull/115) https://github.com/ruby/net-http/commit/6da39b0461 --- lib/net/http.rb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/116) https://github.com/ruby/net-http/commit/22c0d34002 --- lib/net/http.rb | 78 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 19 deletions(-) * remove trailing spaces. [ci skip] --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] [DOC] Reorganize doc for proxy server (https://github.com/ruby/net-http/pull/117) https://github.com/ruby/net-http/commit/f8b6b76cba --- lib/net/http.rb | 198 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 100 insertions(+), 98 deletions(-) [ruby/net-http] Enhanced RDoc for Net::HTTP https://github.com/ruby/net-http/commit/e65a3d9f11 --- lib/net/http.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) [ruby/net-http] Enhanced RDoc for Compression https://github.com/ruby/net-http/commit/cff88acd70 --- lib/net/http.rb | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for request headers (https://github.com/ruby/net-http/pull/120) https://github.com/ruby/net-http/commit/b4eb8a7932 --- doc/net-http/included_setters.rdoc | 3 --- lib/net/http/request.rb | 53 +++++++++++++++++++++++++++++++++++--- lib/net/http/requests.rb | 30 ++++++++++----------- 3 files changed, 64 insertions(+), 22 deletions(-) delete mode 100644 doc/net-http/included_setters.rdoc [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP#get (https://github.com/ruby/net-http/pull/121) https://github.com/ruby/net-http/commit/51b9af1eed --- lib/net/http.rb | 53 +++++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/122) https://github.com/ruby/net-http/commit/06f79cda87 --- lib/net/http.rb | 91 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 34 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/123) https://github.com/ruby/net-http/commit/220ff3f741 --- lib/net/http.rb | 118 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 96 insertions(+), 22 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net:HTTP (https://github.com/ruby/net-http/pull/124) https://github.com/ruby/net-http/commit/aaf26b21d6 --- lib/net/http.rb | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/125) https://github.com/ruby/net-http/commit/2ea20380fc --- lib/net/http.rb | 130 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 87 insertions(+), 43 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/126) https://github.com/ruby/net-http/commit/4700d0660b --- lib/net/http.rb | 87 +++++++++++++++++++++++++++++++------------------- lib/net/http/status.rb | 2 +- 2 files changed, 55 insertions(+), 34 deletions(-) [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP (https://github.com/ruby/net-http/pull/127) https://github.com/ruby/net-http/commit/07b2b88ef5 --- lib/net/http.rb | 65 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 30 deletions(-)
2022-12-19[ruby/net-http] Bump version to 0.3.2Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/b8bdb7248e
2022-12-15[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/da626e4e42
2022-12-14[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/89) https://github.com/ruby/net-http/commit/86b84eb307
2022-12-11[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/85) https://github.com/ruby/net-http/commit/9d9040fb79
2022-12-06[ruby/net-http] [DOC] Fix call-seq for Net::HTTP.startPeter Zhu
The lack of a newline between the call-seq and the documentation was causing the documentation to be parsed as a call-seq. https://github.com/ruby/net-http/commit/1a212e2065
2022-12-05[ruby/net-http] Bump version to 0.3.1Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/09a9ea163a
2022-11-19[ruby/net-http] About the Examples moved to separate fileBurdetteLamar
https://github.com/ruby/net-http/commit/0512b5bfc9
2022-11-19[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/4444e8cea4
2022-11-19[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/6b30c5310b
2022-11-11[ruby/net-http] Update lib/net/http.rbBurdette Lamar
https://github.com/ruby/net-http/commit/16d042fad6 Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-11-11[ruby/net-http] Prettify class hierarchies in Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/4a5732e210
2022-10-24[ruby/net-http] Bump version to 0.3.0 Hiroshi SHIBATA
2022-10-21[ruby/net-http] Revert "Replace Timeout.timeout in Net:HTTP#connect"Hiroshi SHIBATA
This reverts commit https://github.com/ruby/net-http/commit/753cae3bbccc. https://github.com/ruby/net-http/commit/98caa38204
2022-09-28[ruby/net-http] Remove ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFEJeremy Evans
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
2022-05-09[ruby/net-http] Bump version to 0.2.2Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/992d07cb41
2022-04-28[ruby/net-http] Bump version to 0.2.1.pre1Charles Oliver Nutter
https://github.com/ruby/net-http/commit/0017cc64c0
2022-04-20[ruby/net-http] Feature detect to make net/http usable with JRubyKarol Bucek
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
2022-04-20[ruby/net-http] Add ignore_eof access to HTTP and HTTPResponseJeremy Evans
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
2022-04-12[ruby/net-http] Add HTTP#response_body_encoding for setting response body ↵Jeremy Evans
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 <naruse@ruby-lang.org>
2022-02-03[ruby/net-http] Do not set SNI hostname if connecting to IP addressJeremy Evans
RFC 6066, section 3, explicitly disallows the use of an IP address as an SNI server name. So check if the connection is being made to an IP address using the resolv regexps, and do not set an SNI hostname in that case. Recent changes to LibreSSL make it more strictly follow RFC 6066, resulting an s.hostname= raising an error if passed an IP address. When such verions of LibreSSL are used, this change not only fixes the net/http tests, it also fixes tests for webrick and open-uri, which both make SSL connections to 127.0.0.1 using net/http in their tests. Avoid warning in the openssl extension by unsetting @ssl_context.verify_hostname if connecting to an IP address. Make changes so that the post_connection_check still happens when connecting to an IP address, which is necessary to keep checking that the certificate returned includes the IP address, which one of the tests depends on. Revert the previous change that modified the regexp used for checking the error message. https://github.com/ruby/net-http/commit/fa68e64bee
2022-01-17[ruby/net-http] Rename `D` to `debug` in `Net::HTTP`Brandon Weaver
Renames `D` to `debug` in `Net::HTTP` and introduces an alias for backwards compatibility. This was done for readability reasons, in that `D` did not clearly reflect what the method was doing and can cause some confusion. https://github.com/ruby/net-http/commit/582d6e87d6
2022-01-05`res.response_body_permitted?` is not definedKazuhiro NISHIYAMA
`response_body_permitted?` is a method of request.
2021-11-04[ruby/net-http] Reset keep_alive timer on new connectionKazuki Yamaguchi
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
2021-10-30add missing http response code in doc180909
Notes: Merged: https://github.com/ruby/ruby/pull/4970
2021-10-21[ruby/net-http] Bump up net-http version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/f3e65e2a31
2021-05-06[ruby/net-http] Do not require stringioKazuki Yamaguchi
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
2021-04-28[ruby/net-http] Initialize OpenSSL early before creating TCPSocketJeremy Evans
OpenSSL make take some time to initialize, and it would be best to take that time before connecting instead of after. From joshc on Redmine. Fixes Ruby Bug #9459 https://github.com/ruby/net-http/commit/14e09fba24
2021-04-28[ruby/net-http] Decode user and password from env configured proxyLukas Eipert
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
2021-04-28[ruby/net-http] Replace Timeout.timeout in Net:HTTP#connectmohamed
Use Socket.tcp's connect_timeout option instead https://github.com/ruby/net-http/commit/753cae3bbc
2021-01-23[ruby/net-http] Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/net-http/commit/ffb87cad32
2021-01-07We don't need "require 'uri'" after "require 'net/http'".Igor Zubkov
2020-12-22Update library versions of the default gems.Hiroshi SHIBATA
They are followed up with https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
2020-07-30Extract version number from the sourceNobuyoshi Nakada
"requiring version.rb" strategy has some issues. - cannot work when cross-compiling - often introduces wrong namespace - must know the superclasses - costs at each runtime than at build-time etc. Notes: Merged: https://github.com/ruby/ruby/pull/3375
2020-06-05Update docs in net/http.rbKir Shatrov
...to reflect that Net::HTTP.start accepts keep_alive_timeout as an option. Notes: Merged: https://github.com/ruby/ruby/pull/3185
2020-05-12Add missing `,`Kazuhiro NISHIYAMA
2020-05-12Expose SSLContext#extra_chain_cert in Net::HTTPStephen Touset
Currently, Net::HTTP can only send a single SSL certificate when it establishes a connection. Some use-cases involve sending an entire certificate chain to the destination; for this, SSLContext supports assigning to #extra_chain_cert=. This adds support in Net::HTTP for exposing this underlying SSLContext property to end-users. [Feature #9758]
2020-03-10Fix an example committed to a wrong place [ci skip]Takashi Kokubun
2020-03-10Let Net::HTTP.get take request headers (#2957)Takashi Kokubun
* 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>
2020-02-21Promote net-http to the default gems.Hiroshi SHIBATA
test/net/http/test_https.rb: rename fixture methods to read_fixture because it conflicts with test-unit gem.
2020-01-23Add #verify_hostname= and #verify_hostname to skip hostname verification (#2858)Yuta Iwama
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
2019-12-10fix ipaddr parameter of Net::HTTP.start to support proxyNARUSE, Yui
54072e329cab7207fba133caba4fc12b45add8f9
2019-12-10lib/net/http.rb: align the indentationYusuke Endoh
2019-12-09fix typo of 54072e329cab7207fba133caba4fc12b45add8f9NARUSE, Yui