Commit graph

981 commits

Author SHA1 Message Date
Hiroshi SHIBATA
afba96f9f5
Added dependencies for net-http 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA
48149d8fe7
Added dependencies for net-smtp 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA
b0f4cccfae
Added dependencies for net-protocol 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA
dc3a65bd99
[ruby/net-smtp] Bump version to 0.2.1
6e5c09dcc4
2020-11-18 16:28:46 +09:00
Hiroshi SHIBATA
cada6d85d0
Import net-smtp-0.2.0 from https://github.com/ruby/net-smtp 2020-11-17 14:17:45 +09:00
Hiroshi SHIBATA
037803e092
Added dependency for net-protocol 2020-11-06 17:42:57 +09:00
Nobuyoshi Nakada
3198e7abd7
Separate send into public_send and __send__ 2020-10-27 16:12:45 +09:00
nicholas a. evans
f1d32010e6 [ruby/net-smtp] Add SNI support to net/smtp
b706942392
2020-09-14 17:26:36 +09:00
TOMITA Masahiro
141404e898 [ruby/net-smtp] Net::SMTP.start arguments are keyword arguments
The helo argument is not important, but the helo argument must be
specified to specify the user and secret arguments.
If helo, user, secret, and authtype arguments are keyword arguments,
it is not necessary to specify the helo argument.

269774deac
2020-09-14 17:23:41 +09:00
TOMITA Masahiro
888e04ae05 [ruby/net-smtp] TLS should not check the host name by default.
In tlsconnect(), the host name is checked when
@ssl_context.verify_mode is not OpenSSL::SSL::VERIFY_NONE, but the
verify_mode of @ssl_context generated by default is nil.

bde75a15b5
2020-09-14 17:22:35 +09:00
Hiroshi SHIBATA
8fb02b7a97
Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
Hiroshi SHIBATA
0bb8bd7623
Added the missing licenses field to some default gems 2020-08-18 20:26:39 +09:00
Hiroshi SHIBATA
8f71bb0e4f
Fixed the inconsistency gemspec location with net-* gems. 2020-08-05 20:01:03 +09:00
Hiroshi SHIBATA
3ec860ae88
net-ftp is under lib/net instead of lib/net/ftp 2020-08-03 17:52:01 +09:00
Hiroshi SHIBATA
2346e2f0db
Followed up b2d96abb42 for net-ftp. 2020-08-03 17:40:05 +09:00
Nobuyoshi Nakada
b2d96abb42 Extract version number from the source
"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.
2020-07-30 19:03:18 +09:00
Nobuyoshi Nakada
7fb12be99f [ruby/net-ftp] Moved Net::Ftp::Version to Net::FTP
On case-insensitive filesystem, generated Net/FTP.html is
overwritten by Net/Ftp.html.

14a6ff5134
2020-07-28 15:14:01 +09:00
aycabta
c4f8095e97 Use typewriter notation for var[:sym] correctly 2020-07-27 15:24:03 +09:00
Hiroshi SHIBATA
3b3a9edf48
Drop to Ruby 2.4 2020-06-11 13:06:59 +09:00
Hiroshi SHIBATA
44581d98bb [ruby/net-imap] Drop to Ruby 2.4
c3256e3848
2020-06-11 12:39:31 +09:00
Kir Shatrov
a16fcb4205 Update docs in net/http.rb
...to reflect that Net::HTTP.start accepts keep_alive_timeout as an option.
2020-06-05 08:46:06 +09:00
Benoit Daloze
5a79d8e050 Fix error raised by Net::HTTPResponse#inflater if the block raises
* See https://bugs.ruby-lang.org/issues/13882#note-6
2020-05-31 12:48:14 +02:00
Jeremy Evans
fa380208fe Improve documentation for Net::HTTPHeader#set_form [ci skip]
Fixes [Misc #16916]
2020-05-27 13:13:46 -07:00
Shugo Maeda
5e81e8675a
Ignore exceptions when closing data connections [Bug #16780]
Patch by koshigoe (Masataka SUZUKI). Thanks!
2020-05-19 17:48:53 +09:00
Kazuhiro NISHIYAMA
1d2fc91237
Add missing , 2020-05-12 13:25:22 +09:00
Stephen Touset
31af0dafba Expose SSLContext#extra_chain_cert in Net::HTTP
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-05-12 12:55:04 +09:00
Hiroshi SHIBATA
ba3b99b96a
The current net-http is only works with Ruby 2.6+ 2020-04-08 15:59:55 +09:00
Kazuhiro NISHIYAMA
de10631dcf
Add workaround for test-bundler failure
500526558 (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-03-12 19:17:08 +09:00
Takashi Kokubun
da6948753e
Fix an example committed to a wrong place [ci skip] 2020-03-10 22:36:48 -07:00
Takashi Kokubun
e0512b29aa
Let Net::HTTP.get take request headers (#2957)
* 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]
2020-03-10 22:26:22 -07:00
Nobuyoshi Nakada
2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
Nobuyoshi Nakada
108f7536b3
Removed unnecessary chomp
As `String#split` with the default argument drops trailing newline
as a separator, preceding `String#chomp` is futile.
2020-03-07 17:04:37 +09:00
Hiroshi SHIBATA
e7f8724fb2
Fixed net-ftp sync task and resync from standalone repo 2020-02-21 21:25:43 +09:00
Hiroshi SHIBATA
9cb1ffaa5c
Promote net-http to the default gems.
test/net/http/test_https.rb: rename fixture methods to read_fixture
  because it conflicts with test-unit gem.
2020-02-21 21:21:14 +09:00
Hiroshi SHIBATA
f08d8e5e85
Promote net-ftp to default gems 2020-02-21 19:09:21 +09:00
Hiroshi SHIBATA
3e12b65861
Fallback to load version file in ruby core repository 2020-02-20 21:32:27 +09:00
Hiroshi SHIBATA
e9d872a06e
Promote net-imap to the default gems 2020-02-20 21:24:19 +09:00
git
9239226e39 * append newline at EOF. [ci skip] 2020-02-17 22:16:32 +09:00
Hiroshi SHIBATA
0ae9780352
Promote net-protocol to default gems 2020-02-17 22:15:20 +09:00
Nobuyoshi Nakada
e6334fd450
Unnamed groups are not captured when named groups are used 2020-01-30 12:05:18 +09:00
Yuta Iwama
be6931f7f7 Add #verify_hostname= and #verify_hostname to skip hostname verification (#2858)
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
2020-01-23 17:23:17 +09:00
Yusuke Endoh
65c2c75e16 lib/net/imap.rb: use &blk instead of Kernel#proc with no block
[Bug #16488]
2020-01-09 08:21:42 +09:00
Nobuyoshi Nakada
e68999c82c
Fixed misspellings
Fixed misspellings reported at [Bug #16437], for default gems.
2019-12-20 12:19:45 +09:00
Kazuhiro NISHIYAMA
299db37957 Use while instead of loop 2019-12-17 21:56:09 +09:00
NARUSE, Yui
5be34d6a33 ensure to close the data connection [Bug #16413] 2019-12-17 08:24:47 +09:00
Yusuke Endoh
251f5d8226 Revert "lib/net/http/response.rb: support raw deflate correctly"
This reverts commit 5105240b1e.

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]
2019-12-16 23:39:10 +09:00
Yusuke Endoh
5105240b1e lib/net/http/response.rb: support raw deflate correctly
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]
2019-12-16 23:20:42 +09:00
NARUSE, Yui
af11efd377 fix ipaddr parameter of Net::HTTP.start to support proxy
54072e329c
2019-12-10 19:12:21 +09:00
Yusuke Endoh
3ca3c8d768 lib/net/http.rb: align the indentation 2019-12-10 14:15:35 +09:00
NARUSE, Yui
c2dc27d643 fix typo of 54072e329c 2019-12-09 20:48:35 +09:00