summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
AgeCommit message (Collapse)Author
2023-03-07[ruby/net-http] Re-applyHiroshi SHIBATA
https://github.com/ruby/net-http/commit/d22ca54904de after testing https://github.com/ruby/net-http/commit/7ac7401a9c
2023-03-06[ruby/net-http] Test building packagesNobuyoshi Nakada
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
2023-03-06Replaced non-ascii charactor. It fails version detection at `net-http.gemspec`.Hiroshi SHIBATA
># Returns the X509 certificate chain for the session<E2><80><99>s socket peer.
2023-03-05[ruby/net-http] [DOC] What's Here for Net:HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/128) https://github.com/ruby/net-http/commit/39e70f0f9b
2023-02-26[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/127) https://github.com/ruby/net-http/commit/07b2b88ef5
2023-02-24[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/126) https://github.com/ruby/net-http/commit/4700d0660b
2023-02-23[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/125) https://github.com/ruby/net-http/commit/2ea20380fc
2023-02-22[ruby/net-http] [DOC] Enhanced RDoc for Net:HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/124) https://github.com/ruby/net-http/commit/aaf26b21d6
2023-02-20[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/123) https://github.com/ruby/net-http/commit/220ff3f741
2023-02-16[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/122) https://github.com/ruby/net-http/commit/06f79cda87
2023-02-15[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP#getBurdette Lamar
(https://github.com/ruby/net-http/pull/121) https://github.com/ruby/net-http/commit/51b9af1eed
2023-02-13[ruby/net-http] Enhanced RDoc for CompressionBurdetteLamar
https://github.com/ruby/net-http/commit/cff88acd70
2023-02-07[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/e65a3d9f11
2023-02-07[ruby/net-http] [DOC] Reorganize doc for proxy serverBurdette Lamar
(https://github.com/ruby/net-http/pull/117) https://github.com/ruby/net-http/commit/f8b6b76cba
2023-02-04* remove trailing spaces. [ci skip]git
2023-02-04[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/116) https://github.com/ruby/net-http/commit/22c0d34002
2023-02-03[ruby/net-http] [DOC] Enhanced RDoc for write_timeoutBurdette Lamar
(https://github.com/ruby/net-http/pull/115) https://github.com/ruby/net-http/commit/6da39b0461
2023-01-31[ruby/net-http] Redirection revisionBurdetteLamar
https://github.com/ruby/net-http/commit/9a4e2d3a2a
2023-01-31[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/110) https://github.com/ruby/net-http/commit/b098caa5e4
2023-01-31Manually merged https://github.com/ruby/net-http/pull/106Hiroshi SHIBATA
Co-authored-by: Peter Zhu <[email protected]> Co-authored-by: BurdetteLamar <[email protected]>
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 <[email protected]>
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 <[email protected]>
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%[email protected]: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