Commit graph

283 commits

Author SHA1 Message Date
shugo
f78d45b365 * lib/net/imap.rb: backported exception handling from trunk.
[ruby-core:29745]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08 23:09:10 +00:00
nobu
255b55a3dd * lib/net/smtp.rb (Net::SMTP#rcptto_list): fixed typo.
[ruby-core:29809]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-27 09:00:52 +00:00
shugo
39d4e75969 * lib/net/imap.rb (fetch_internal): do not quote message data item
names.  Thanks, Eric Hodel.  [ruby-core:23508]


Conflicts:

	ChangeLog

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25 13:07:30 +00:00
shugo
1b9012049d * lib/net/imap (encode_utf7): encode & properly. Thanks, Kengo
Matsuyama.  [ruby-dev:38063]  backported from trunk.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25 12:42:10 +00:00
nobu
19f2f28c98 * lib/net/smtp.rb (Net::SMTP#rcptto_list): continue when at least
one RCPT is accepted.  based on a patch from Kero van Gelder at
  [ruby-core:26190].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16 23:57:43 +00:00
nobu
75c1cac7f3 * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16 21:51:01 +00:00
nobu
3657e15519 * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20 03:30:59 +00:00
nobu
5facf7e22f * lib/net/http.rb (Net::HTTP#request): close @socket only after
started.  [ruby-core:28028]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03 12:15:02 +00:00
nobu
9709d719f6 * lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}):
use inclusive range same as the header representation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 06:49:46 +00:00
nahi
471ad3039c * lib/net/http.rb (HTTPGenericRequest#send_request_with_body_stream):
increased encoding chunk size for POST request with body_stream
          (1K -> 16K). patched by Brian Candler. #1284.

        * test/net/http/test_post_io.rb: added for the patch. It's good if a
          patch comes with a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20 14:54:18 +00:00
shugo
5cd52d02eb * lib/net/ftp.rb (putbinaryfile): use APPE for resume.
Thanks, Tomoyuki Chikanaga.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 14:23:45 +00:00
shugo
c20c7f1e2e * lib/net/imap.rb (flag_list): untaint strings to intern in the safe
level 1.
* lib/net/imap.rb (max_flag_count=): new methods to set the max
  number of flags interned to symbols.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 13:38:35 +00:00
nahi
5d19cfe23f * lib/net/http.rb (Net::HTTPResponse#each_response_header):
cosmetic: '?\ ' -> '?\s'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-31 08:19:47 +00:00
nahi
76af5abe21 * lib/net/http.rb (Net::HTTPResponse#each_response_header):
accept multiline message header of HTTP response.  see #1796.
          cf. RFC 2616 '4.2 Message Header'.  

        * test/net/http/test_httpresponse.rb: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30 13:05:23 +00:00
shugo
22de98b53b * lib/net/imap.rb (resp_text_code): accepts response codes without
text.  backported from trunk.  [ruby-core:24194]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-15 03:01:29 +00:00
shugo
38f8c64efe * lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 14:25:53 +00:00
marcandre
4432d3a522 * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian Candler [ruby-core:22723]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-08 15:34:51 +00:00
marcandre
8cdc1fca44 * lib/net/http.rb (transport_request): Handle timeout error by closing socket if exception raised. [ruby-core:20976]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 04:33:59 +00:00
knu
bda2980b2a Fix grammos regarding the verb "refer".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 09:05:28 +00:00
matz
c86c2e3a1c * lib/net/ftp.rb (Net::FTP#open_socket): SOCKSsocket is obsolete.
a patch from Alan Johnson <alan.wayne.johnson at gmail.com> in 
  [ruby-core:19982].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 12:28:47 +00:00
kazu
9cb436cec8 * lib/net/pop.rb: check for invalid APOP timestamp. (CVE-2007-1558)
[ruby-dev:36631]

* test/net/pop/test_pop.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 02:18:50 +00:00
shugo
57a2bb783a * lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct
is not supplied.  backported from trunk.  fixed [ruby-core:18058].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 11:57:04 +00:00
shugo
530ad54d8b * lib/net/ftp.rb (chdir): handle 5xx errors correctly.
backported from trunk.  fixed [ruby-core:18057].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 07:43:39 +00:00
shugo
a5a4354976 * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
environments without OpenSSL.  backported from trunk.
  fixed [ruby-dev:35755].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 07:34:59 +00:00
shyouhei
9724036ebe * lib/net/smtp.rb (Net::SMTP::rcptto): fix a typo. a patch from
Masao Takaku <masao at nii.ac.jp>
	  fix [ruby-dev:35489].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04 05:46:53 +00:00
nobu
57d6cc35eb * lib/net/ftp.rb (Net::FTP#sendport): use divmod. [ruby-core:17557]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04 05:17:25 +00:00
matz
d5a5a3b73a * lib/net/smtp.rb (Net::SMTP::start): use 'localhost' instead of
'localhost.localdomain'.  [ruby-dev:35333]

* lib/net/smtp.rb (Net::SMTP::SMTP.start): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03 03:53:48 +00:00
kazu
37543cac86 * lib/net/pop.rb (Net::POP3#set_all_uids): speed
up. a patch from <m-sumi AT techfirm.co.jp> [ruby-list:45047]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 11:44:32 +00:00
matz
6a7b828892 * lib/rdoc.rb: massive spelling correction patch from Evan Farrar
<evanfarrar at gmail.com> in [ruby-doc:1382] applied.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:39:55 +00:00
jeg2
889c22455a Merged 16257 from trunk.
* lib/net/telnet.rb:  This patch from Brian Candler adds a FailEOF mode which
	  can be activated to have net/telnet raise EOFError exceptions when the 
	  remote connection is closed.  The default behavior remains unchanged though.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 15:09:29 +00:00
jeg2
0fc23bda52 Merged 16241 from trunk.
* lib/net/telnet.rb:  Fixing a bug where line endings would not be properly
  escaped when the two character ending was broken up into separate TCP
  packets.  Issue reported and patched by Brian Candler.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 11:23:15 +00:00
kazu
545c0d6aa3 * lib/net/pop.rb: backported from 1.9. bug#19003
* ext/openssl/lib/openssl/ssl.rb: set_params; backported from 1.9.
  bug#19552, [ruby-dev:34402]

* ext/openssl/ossl_ssl.c: ditto.

* test/openssl/test_ssl.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 14:52:21 +00:00
kazu
f5f83a0004 * lib/net/smtp.rb: backported from 1.9. bug#19003
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 08:50:21 +00:00
matz
5e50b5099f * lib/net/pop.rb (Net::POP3::do_finish): clear @n_mails and
@n_bytes as well.  [ruby-core:16144]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03 20:58:13 +00:00
jeg2
8f009c18e8 Merged 13781 from trunk.
* lib/net/telnet.rb (Net::Telnet#login): Allowing "passphrase" in
  addition to "password" for Telnet login prompts. [ruby-Bugs-10746]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 22:18:58 +00:00
jeg2
40e6b491ea Merged 13779 from trunk.
* lib/net/telnet.rb (Net::Telnet#login): Making the password prompt
  pattern case insensitive. [ruby-Bugs-10746]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 21:46:51 +00:00
gotoyuzo
b4b36c06fa * lib/net/http.rb, lib/open-uri.rb: remove
Net::HTTP#enable_post_connection_check.  [ruby-dev:31960]

* lib/net/imap.rb: hostname should be verified against server's
  indentity as persented in the server's certificate. [ruby-dev:31960]

* ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-08 11:16:54 +00:00
shyouhei
b0001e9212 lib/net/http.rb: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-24 07:55:41 +00:00
gotoyuzo
80865ba2db * lib/net/http.rb: an SSL verification (the server hostname should
be matched with its certificate's commonName) is added.
  this verification can be skipped by
  "Net::HTTP#enable_post_connection_check=(false)".
  suggested by Chris Clark <cclark at isecpartners.com>

* lib/net/open-uri.rb: use Net::HTTP#enable_post_connection_check to
  perform SSL post connection check.

* ext/openssl/lib/openssl/ssl.c
  (OpenSSL::SSL::SSLSocket#post_connection_check): refine error message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-23 22:21:42 +00:00
shugo
7d5ef148a7 * lib/net/imap.rb (ResponseParser#next_token): fixed
error message. (backported from HEAD)
* lib/net/imap.rb (ResponseParser#parse_error): fixed
the condition not to refer @token.symbol unexpectedly.
Thanks, Dick Monahan. (backported from HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-04 02:12:34 +00:00
shugo
8bfcb85408 * lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX
responses for some FTP servers. (backported from HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:27:12 +00:00
shugo
687637e280 * lib/net/imap.rb (disconnect): call shutdown for
SSLSocket. Thanks, Technorama Ltd.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-09 00:29:48 +00:00
aamine
cad1282b24 * lib/net/protocol.rb (rbuf_read): extend buffer size for speed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 02:39:22 +00:00
matz
46fa18da5b Revert r11453
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03 03:14:57 +00:00
matz
4ee717dcae * io.c (ruby_dup): start GC on ENOMEM as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03 02:51:44 +00:00
shugo
0e0a33ddd7 * lib/net/imap.rb: accept NOMODSEQ. [ruby-core:9002]
(backported from HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-04 04:35:13 +00:00
shugo
6f0192e428 * lib/net/imap.rb: allow extra spaces in responses.
Thanks, Tom Soderlund. (backported from HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-20 00:46:46 +00:00
aamine
a18462b2f3 small document fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-26 13:27:18 +00:00
aamine
8e1f07d6b3 * lib/net/http.rb: sync with HEAD (rev 1.132).
* lib/net/http.rb (Net::HTTP#post, request_post, request): should set Content-Type: x-www-form-urlencoded by default.
* lib/net/http.rb (Net::HTTPHeader#content_type): should return nil when there's no Content-Type.
* lib/net/http.rb (Net::HTTPHeader#sub_type): should return nil when there's no sub Content-Type (e.g. "Content-Type: text").
* lib/net/http.rb (Net::HTTPHeader#type_params): wrongly failed when there's no Content-Type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-26 13:15:31 +00:00
matz
2c44e16b13 * lib/net/http.rb (Net::HTTPResponse): duplicated error 501;
HTTPInternalServerError should be error 500.  [ruby-core:08037]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-22 02:54:39 +00:00