aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
Commit message (Collapse)AuthorAgeFilesLines
* Fix error raised by Net::HTTPResponse#inflater if the block raisesBenoit Daloze2020-05-311-2/+3
| | | | * See https://bugs.ruby-lang.org/issues/13882#note-6
* Improve documentation for Net::HTTPHeader#set_form [ci skip]Jeremy Evans2020-05-271-16/+36
| | | | Fixes [Misc #16916]
* Ignore exceptions when closing data connections [Bug #16780]Shugo Maeda2020-05-191-8/+8
| | | | Patch by koshigoe (Masataka SUZUKI). Thanks!
* Add missing `,`Kazuhiro NISHIYAMA2020-05-121-1/+1
|
* Expose SSLContext#extra_chain_cert in Net::HTTPStephen Touset2020-05-121-0/+6
| | | | | | | | | | 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]
* The current net-http is only works with Ruby 2.6+Hiroshi SHIBATA2020-04-081-1/+1
|
* Add workaround for test-bundler failureKazuhiro NISHIYAMA2020-03-126-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* Fix an example committed to a wrong place [ci skip]Takashi Kokubun2020-03-101-1/+1
|
* Let Net::HTTP.get take request headers (#2957)Takashi Kokubun2020-03-101-10/+24
| | | | | | | | | | | * 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]
* Specify explicit separator not to be affected by $;Nobuyoshi Nakada2020-03-082-2/+2
|
* Removed unnecessary `chomp`Nobuyoshi Nakada2020-03-071-1/+1
| | | | | As `String#split` with the default argument drops trailing newline as a separator, preceding `String#chomp` is futile.
* Fixed net-ftp sync task and resync from standalone repoHiroshi SHIBATA2020-02-211-2/+2
|
* Promote net-http to the default gems.Hiroshi SHIBATA2020-02-213-1/+35
| | | | | test/net/http/test_https.rb: rename fixture methods to read_fixture because it conflicts with test-unit gem.
* Promote net-ftp to default gemsHiroshi SHIBATA2020-02-213-1/+35
|
* Fallback to load version file in ruby core repositoryHiroshi SHIBATA2020-02-201-1/+5
|
* Promote net-imap to the default gemsHiroshi SHIBATA2020-02-203-1/+31
|
* * append newline at EOF. [ci skip]git2020-02-171-1/+1
|
* Promote net-protocol to default gemsHiroshi SHIBATA2020-02-172-0/+34
|
* Unnamed groups are not captured when named groups are usedNobuyoshi Nakada2020-01-301-4/+4
|
* Add #verify_hostname= and #verify_hostname to skip hostname verification (#2858)Yuta Iwama2020-01-231-3/+11
| | | | | | | | | | | | 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
* lib/net/imap.rb: use `&blk` instead of Kernel#proc with no blockYusuke Endoh2020-01-091-4/+5
| | | | [Bug #16488]
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], for default gems.
* Use while instead of loopKazuhiro NISHIYAMA2019-12-171-12/+4
|
* ensure to close the data connection [Bug #16413]NARUSE, Yui2019-12-171-16/+28
|
* Revert "lib/net/http/response.rb: support raw deflate correctly"Yusuke Endoh2019-12-161-3/+3
| | | | | | | | | | | | | | | | 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]
* lib/net/http/response.rb: support raw deflate correctlyYusuke Endoh2019-12-161-3/+3
| | | | | | | | | | | | | | 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]
* fix ipaddr parameter of Net::HTTP.start to support proxyNARUSE, Yui2019-12-101-1/+1
| | | | 54072e329cab7207fba133caba4fc12b45add8f9
* lib/net/http.rb: align the indentationYusuke Endoh2019-12-101-2/+2
|
* fix typo of 54072e329cab7207fba133caba4fc12b45add8f9NARUSE, Yui2019-12-091-1/+1
|
* Add ipaddr optional parameter to Net::HTTP#startNARUSE, Yui2019-12-091-8/+21
| | | | | | | | | | | | | | | | 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
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-1/+1
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans2019-11-181-6/+0
| | | | | | | | | | | | | | | | | This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd.
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2019-11-151-1/+1
|
* Fixed test failure related Net::ProtocolHiroshi SHIBATA2019-11-072-2/+4
|
* SMTP is not moduleHiroshi SHIBATA2019-11-071-1/+1
|
* Promote net-smtp to default gemsHiroshi SHIBATA2019-11-073-1/+33
|
* Promote net-pop to default gemsHiroshi SHIBATA2019-11-073-1/+33
|
* Improve Net::HTTP docs:zverok2019-10-262-6/+12
| | | | | | | * Make links from Net::GenericHTTPRequest work; * Document +dest+ param of HTTPResponse#read_body; * Slightly improve reference to particular response classes from HTTPResponse class docs.
* Net::FTP: fix formatting problems for #status methodzverok2019-10-261-1/+2
|
* Remove uselsess shebangPavel Valena2019-10-091-1/+0
| | | as the file is not executable anyway.
* Ignore Errno::EPIPE when sending requests in net/httpJeremy Evans2019-09-271-1/+7
| | | | | | | | 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]
* Add Net::FTP#features and Net::FTP#optionShugo Maeda2019-09-021-0/+35
| | | | | Patch by darkphnx (Dan Wentworth) . Thanks! [Feature #15964]
* Fix keyword argument separation issues in libJeremy Evans2019-08-302-2/+2
| | | | Mostly requires adding ** in either calls or method definitions.
* Fix typo: duplicated the [skip-ci]ohbarye2019-08-091-1/+1
|
* Show the caller's locationNobuyoshi Nakada2019-07-241-2/+2
| | | | | * lib/net/http/header.rb: show the caller's location instead of the current lines.
* Fix documentation for Net::SMTPServerBusyJeremy Evans2019-06-271-1/+1
| | | | Fixes [Bug #11628]
* Avoid verbose warning when using Net::POP3 with SSLJeremy Evans2019-06-201-0/+1
| | | | | | Patch from Jos Kamphorst. Fixes [Bug #14822]
* Support SNI (Reapplying r67488)knu2019-04-151-0/+1
| | | | | | | | | | This fixes connecting using TLS 1.3 to imap.gmail.com [Fix GH-2077] [Feature #15594] From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reverting all commits from r67479 to r67496 because of CI failureskazu2019-04-101-1/+0
| | | | | | | | Because hard to specify commits related to r67479 only. So please commit again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support SNIshugo2019-04-091-0/+1
| | | | | | | | | | This fixes connecting using TLS 1.3 to imap.gmail.com [Fix GH-2077] [Feature #15594] From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e