summaryrefslogtreecommitdiff
path: root/lib/net/http
AgeCommit message (Collapse)Author
2022-12-23Revert the additional changes from net-http-0.3.2Hiroshi SHIBATA
2022-12-21[ruby/net-http] Adding links to referencesBurdetteLamar
https://github.com/ruby/net-http/commit/71bae5c0fe
2022-12-21[ruby/net-http] Adding links to referencesBurdetteLamar
https://github.com/ruby/net-http/commit/e4df80f299
2022-12-21[ruby/net-http] Adding links to referencesBurdetteLamar
https://github.com/ruby/net-http/commit/df5a554fa8
2022-12-18[ruby/net-http] Adding links to referencesBurdetteLamar
https://github.com/ruby/net-http/commit/6dfe6f411a
2022-12-14[ruby/net-http] [DOC] New doc for responses classesBurdette Lamar
(https://github.com/ruby/net-http/pull/91) https://github.com/ruby/net-http/commit/d394404402
2022-12-14[ruby/net-http] [DOC] Correct formatting in header.rbBurdette Lamar
(https://github.com/ruby/net-http/pull/90) https://github.com/ruby/net-http/commit/d9d829ca53
2022-12-12[ruby/net-http] [DOC] Enhanced RDoc for HTTPHeaderBurdette Lamar
(https://github.com/ruby/net-http/pull/88) https://github.com/ruby/net-http/commit/46e966be10
2022-12-04[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/84) https://github.com/ruby/net-http/commit/660046386f
2022-12-01[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPHeaderBurdette Lamar
(https://github.com/ruby/net-http/pull/83) https://github.com/ruby/net-http/commit/1ea5004098
2022-11-28[ruby/net-http] Enhanced RDoc for header RangeBurdette Lamar
(https://github.com/ruby/net-http/pull/82) https://github.com/ruby/net-http/commit/a26f62a2e5
2022-11-27[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPHeaderBurdette Lamar
https://github.com/ruby/net-http/commit/77c6878970
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/86b0514239
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/ef0ef53b0c
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/0af9fb94a9
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/995ff356b4
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/e924f1205b
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
2022-11-19[ruby/net-http] Update lib/net/http/request.rbBurdette Lamar
https://github.com/ruby/net-http/commit/e3c9011edb Co-authored-by: Peter Zhu <peter@peterzhu.ca>
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-10-13Raise ArgumentError with empty host url again.Hiroshi SHIBATA
Fixup dd5118f8524c425894d4716b787837ad7380bb0d Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/6538
2022-06-16[ruby/net-http] Make `Net::HTTPHeader#content_range` return nil on non-byte ↵Shishir Joshi
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 <nobu@ruby-lang.org>
2022-06-16Revert "HTTPHeader.content_range throws error on non-byte units"Nobuyoshi Nakada
This reverts commit 63546bfc1581d4abec2a0d846106a1c0afc0efa9.
2022-06-16HTTPHeader.content_range throws error on non-byte unitsShishir Joshi
* 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 <naruse@airemix.jp>
2022-05-23[ruby/net-http] [DOC] Get rid of a RDoc bugNobuyoshi Nakada
RDoc overrides class name by the assigned name unexpectedly when assigned using a qualified class path. https://github.com/ruby/net-http/commit/a7bded0407
2022-05-21[ruby/net-http] Make the recommended name formalNobuyoshi Nakada
`HTTPServerException` is the name deprecated since years ago. https://github.com/ruby/net-http/commit/b3028fef5a
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-14[ruby/net-http] Update the content-length heading when decoding bodiesJeremy Evans
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 <stan001212@gmail.com>
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-04-03[ruby/net-http] Revert "Update the content-length heading when decoding bodies"Jeremy Evans
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
2022-04-02[ruby/net-http] Update the content-length heading when decoding bodiesJeremy Evans
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
2022-02-21Removed dependency of net-protocol. There is no plan to remove from stdlibHiroshi SHIBATA
2021-11-17[ruby/net-http] gemspec: Drop unused directive "executables"Olle Jonsson
This gem exposes no executable files. https://github.com/ruby/net-http/commit/3b3743f6ce
2021-11-11[ruby/net-http] Send Accept-Encoding header on HEAD methodShohei Maeda
https://github.com/ruby/net-http/commit/9d95c5e3e6
2021-11-04[ruby/net-http] Warn deprecated old constantsNobuyoshi Nakada
https://github.com/ruby/net-http/commit/2a97b4729b
2021-11-04[ruby/net-http] Fix the typo in a constant nameNobuyoshi Nakada
https://github.com/ruby/net-http/commit/dada6007bf
2021-07-29[ruby/net-http] Enforce write timeout when body_stream is usedMiguel Teixeira
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
2021-04-28[ruby/net-http] Fix the regexp used to clean the hostJean Boussier
Introduced in https://github.com/ruby/ruby/commit/c1652035644 `/s` marks the regexp as encoded with Windows-31J which makes little sense. Nurse thinks the intent was to use `/m` for a multi-line regexp. https://github.com/ruby/net-http/commit/6c15342cdf
2020-12-02Added dependencies for net-httpHiroshi SHIBATA
2020-11-06Added dependency for net-protocolHiroshi SHIBATA
2020-08-18Added the missing licenses field to some default gemsHiroshi SHIBATA
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-05-31Fix error raised by Net::HTTPResponse#inflater if the block raisesBenoit Daloze
* See https://bugs.ruby-lang.org/issues/13882#note-6 Notes: Merged: https://github.com/ruby/ruby/pull/3164
2020-05-27Improve documentation for Net::HTTPHeader#set_form [ci skip]Jeremy Evans
Fixes [Misc #16916]
2020-04-08The current net-http is only works with Ruby 2.6+Hiroshi SHIBATA
2020-03-12Add workaround for test-bundler failureKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/500526558?check_suite_focus=true#step:16:127 ``` Failures: 1) Bundler.setup when Bundler is bundled doesn't blow up Failure/Error: expect(err).to be_empty expected `"fatal: not a git repository (or any of the parent directories): .git\nfatal: not a git repository (o...the parent directories): .git\nfatal: not a git repository (or any of the parent directories): .git".empty?` to return true, got false Commands: $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle install --retry 0 Resolving dependencies... Using bundler 2.1.4 Bundle complete! 1 Gemfile dependency, 1 gem now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle exec ruby -e \ require\ \'bundler\'\;\ Bundler.setup fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 # ./spec/bundler/runtime/setup_spec.rb:1056:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (2 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:78:in `block (2 levels) in <top (required)>' make: *** [yes-test-bundler] Error 1 ```
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.
2019-12-16Revert "lib/net/http/response.rb: support raw deflate correctly"Yusuke Endoh
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]