Граф коммитов

777 Коммитов

Автор SHA1 Сообщение Дата
mame 606208becf * lib/net/smtp.rb (check_continue): raise an error with an explanatory
message.  [ruby-core:35854] [Feature #4598]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 12:55:13 +00:00
nobu 535a28c737 see OpenSSL::SSL
* lib/net/imap.rb (Net::IMAP): see if actually used SSL is defined to
  get rid of autoloaded OpenSSL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:38 +00:00
nobu cf6116150c autoload in module scope.
* lib/net/http.rb (Net::OpenSSL): get rid of autoload in global scope
  not to make tests confused.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:36 +00:00
nobu 7255d93b08 deal with timeout exceptions
* lib/net/http.rb (Net::HTTP#transport_request): deal with
  Net::OpenTimeout and Net::ReadTimeout first to get rid of loading
  OpenSSL as possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:31 +00:00
drbrain ea9b6997cc * lib/net/protocol.rb (module Net): Added ReadTimeout to match
OpenTimeout.  ReadTimeout is now raised by rbuf_fill instead of
  Timeout::Error to help users distinguish what type of timeout
  occurred.  [ruby-trunk - Feature #6088]
* lib/net/pop.rb (module Net):  Updated documentation for ReadTimeout
  and OpenTimeout.
* lib/net/http.rb (module Net):  ditto
* lib/net/smtp.rb (module Net):  ditto
* lib/net/telnet.rb (module Net):  Net::ReadTimeout is now raised in
  waitfor to match Net::Protocol.
* test/net/http/test_http.rb:  Updated Timeout::Error expectation to
  Net::ReadTimeout.
* test/net/ftp/test_ftp.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 21:20:51 +00:00
naruse b386b25aac * lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
use IO.copy_stream for requests using body_stream.
  patched by Eric Wong. [ruby-core:40898] [Feature #5605]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 09:23:11 +00:00
naruse 7865005fa1 * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 04:10:58 +00:00
naruse 096ffa2a63 * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
read on closing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 01:33:58 +00:00
naruse bc2ece6cf8 * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
* lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.

* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
  with shutdown and read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 19:24:30 +00:00
naruse ae79409db4 * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
for Net::FTP#abort and Net::FTP#status..

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 14:06:38 +00:00
shugo d8438024a2 * lib/net/ftp.rb: fixed the domain name in examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 15:56:18 +00:00
shugo 5f81a53fd2 * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 04:44:36 +00:00
shugo bb314d3347 * lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:43:27 +00:00
shugo d68b3a38e9 * lib/net/ftp.rb (parse227, parse228, parse229): don't use local
variables defined by named capture for other Ruby implementations
  such as Rubinius.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:39:21 +00:00
shugo 422c8baeb9 * lib/net/ftp.rb (parse_pasv_port): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:39:16 +00:00
shugo 8c89d8ef72 * lib/net/ftp.rb (parse227, parse228, parse229): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 10:52:04 +00:00
shugo 6853b44a92 * lib/net/imap.rb (initialize): raise Net::IMAP::Error when the
connection is closed without a greeting response.
  [ruby-core:40938] [Bug #5616]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16 05:12:39 +00:00
shugo ed07df5ab5 * lib/net/imap.rb (rfc822_text): ignore [] after RFC822.
[ruby-core:40945] [Bug #5620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16 04:56:18 +00:00
drbrain 09f27873ed * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Error
* lib/net/pop.rb:  Modernize Timeout usage.  Patch by Eric Wong.
	  Use Net::OpenTimeout instead of Timeout::Error.  [Bug #5765]
	* lib/net/http.rb:  ditto
	* lib/net/smtp.rb:  ditto
	* lib/net/telnet.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28 05:15:54 +00:00
drbrain 8a7da58c0f * lib/net/http.rb: Retry HTTP requests for additional network errors.
Introduce OpenTimeout subclass of Timeout::Error.  [Bug #6001]
	* test/net/http/test_http.rb:  Reduce timeout to 0.01s for faster test
	* test/net/http/test_https.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28 04:51:37 +00:00
ayumin e0f4a550e5 * lib/net/http.rb: Fix documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24 03:10:25 +00:00
drbrain 7a1180c745 * lib/net/http.rb (Net::HTTP#transport_request): Fix infinite loop
upon EOFError or Errno::ECONNRESET where count is reset to 0.
* test/net/http/test_http.rb (class TestNetHTTPKeepAlive):  Test for
  above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24 01:10:07 +00:00
shyouhei 5de2c3c2d3 Writing entire packet at once to avoid incomplete transmission
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-23 12:25:19 +00:00
naruse bee7ccddd2 * lib/net/http.rb (Net::HTTP#transport_request): retry a idempotent
request automatically. [ruby-dev:45030] [Bug #5790]
  [ruby-core:41821] [Bug #5813]

* lib/net/http.rb (Net::HTTP#keep_alive_timeout=): added to specify
  the second to reconnect the TCP connection on Keep-Alive.
  The default value is 2 second because current servers uses 2 sec.
  http://ftp-admin.blogspot.com/2009/09/keepalivetimeout2.html

* lib/net/http.rb (Net::HTTP#begin_transport): reconnect TCP
  connection on keep-alive timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-20 05:56:35 +00:00
shugo e48c8be89b * lib/net/imap.rb: includes the sequence number of UID in a error
message.  suggested by art lussos.
  [ruby-core:41413] [Feature #5692]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-11 03:21:43 +00:00
naruse b361c5adec Fix typo in r33849.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-26 20:03:32 +00:00
naruse b6b8cc01a5 * lib/net/http.rb (Net::HTTP::SSL_IVNAMES): rerefix 33701.
SSL_ATTRIBUTES stores names for set_params, they are symbol.
  SSL_IVNAMES stores instance variable names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-26 19:59:11 +00:00
naruse 708d76a3b1 * lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
if given URI object is https.
  patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]

* lib/net/http.rb (Net::HTTP.post_form): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-26 11:44:45 +00:00
naruse 9d4db2d4d9 * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
store instance variable symbol names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-26 11:06:53 +00:00
drbrain 661a936e64 * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): Use symbol keys instead
of string keys to avoid duplicating parameters in
  OpenSSL::SSL:SSLContext#set_params.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 23:35:35 +00:00
ktsj c3749b6a6d * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
  lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
  lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
  lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
  lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
  lib/shell/command-processor.rb, lib/shell/process-controller.rb,
  lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
  arguments to avoid creating Proc objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 07:37:47 +00:00
shugo 26f73a5117 * lib/net/imap.rb (default_port, default_imap_port,
default_tls_port, default_ssl_port, default_imaps_port):
  added methods for consistency with Net::POP.
  based on the patch by art lussos.  [ruby-core:38997] [Bug #5198]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-04 13:33:14 +00:00
drbrain ca96541149 * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
by Luke Gruber.  [#5203]
* ext/pty/lib/expect.rb:  ditto
* lib/mathn.rb:  ditto
* lib/net/http.rb:  ditto
* lib/open-uri.rb:  ditto
* lib/ostruct.rb:  ditto
* lib/tempfile.rb:  ditto
* lib/thread.rb:  ditto
* lib/weakref.rb:  ditto
* sample/webrick/httpproxy.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26 22:22:37 +00:00
shugo 2bd37c7183 * lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
connection is closed.  based on the patch by Hugo Barauna.
  [Bug #5190] [ruby-core:38930]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-19 05:16:20 +00:00
shugo 28b5db007f * lib/net/imap.rb (msg_att): accepts extra space before ')'.
based on the patch by art lussos.  [Bug #5163] [ruby-core:38820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-19 02:32:59 +00:00
akr 184f041fb8 * lib/net/pop.rb: fix typo in document.
* lib/net/http.rb: ditto.

* lib/net/imap.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-10 12:28:19 +00:00
naruse a967390d04 * lib/net/http.rb: come back autoload. OpenSSL constant is used
some places, so it leads mistakes like HTTP.start.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09 17:56:40 +00:00
drbrain a58c76cc20 * lib/net/http.rb: Net::HTTP#finish is used to manually close
connections.  [Ruby 1.9 - Bug #5045]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:58:10 +00:00
nahi 800c313bde * lib/net/http.rb (Net::HTTP.post_form): Do not ignore query part of
the given URI to post. See #655.

* test/net/http/test_http.rb, test/net/http/utils.rb: Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 17:44:44 +00:00
drbrain dbf9baeddf * lib/timeout.rb: Clarify timeout duration types. Patch by Alf Mikula.
[Ruby 1.9 - Bug #4791]
	* lib/net/http.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 05:24:12 +00:00
shugo 97ac172d58 * lib/net/imap.rb (search_response): parses SEARCH responses from
the Yahoo IMAP server correctly.  patched by Mark Nadig.  [Bug #4509]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 02:41:03 +00:00
naruse 2ba3909c0a Additional fix for r31933.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-13 10:21:07 +00:00
naruse df36601017 * lib/net/http.rb (Net::HTTP#use_ssl?): require 'openssl' only when
https is needed. fixes r31933.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-13 08:03:22 +00:00
naruse 80651edad2 * lib/net/http.rb: don't use autoload.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 01:53:41 +00:00
nahi b219a56c07 * lib/net/http.rb, lib/net/protocol.rb: Allow to configure to wait
server returning '100 continue' response befor sending HTTP request
  body. See NEWS for more detail. See #3622.
  Original patch is made by Eric Hodel <drbrain@segment7.net>.

* test/net/http/test_http.rb: test it.

* NEWS: Add new feature.

On my env (Ubuntu 11.04 64bit),
9510 tests, 2203824 assertions, 0 failures, 0 errors, 29 skips
->
9514 tests, 2203836 assertions, 0 failures, 0 errors, 29 skips


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 08:10:42 +00:00
drbrain 0441079b58 * lib/net/pop.rb: Hide implementation details from RDoc.
[Ruby 1.9 - Bug #4711]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 00:30:04 +00:00
drbrain 9c711c0be6 * lib/net/ftp.rb: Add :nodoc: for private methods.
[Ruby 1.9 - Bug #4710]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 00:26:51 +00:00
drbrain 1cb6879c82 * lib/net/smtp.rb: Document Net::SMTP::Response. Patch by J.R. Garcia.
[Ruby 1.9 - Bug #4768]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23 00:21:10 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain b205e55953 * lib/benchmark.rb: Fix indentation.
* lib/net/imap.rb:  Fix indentation of regular expressions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 22:07:09 +00:00
drbrain f535b33f8d * lib/net/imap.rb: Fix indentation of EOF for heredoc.
* lib/debug.rb (Commands):  Fix indentation of EOHELP for heredoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:41:01 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
drbrain af70305901 * lib/net/ftp.rb (module Net):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-17 19:51:16 +00:00
drbrain 13ae409e1e * lib/net/http.rb: Improve documentation of proxy configuration
methods.  Patch by Alf Mikula.  [Ruby 1.9 - Bug #4714]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16 22:15:32 +00:00
drbrain a13b23973a * lib/net/pop.rb: Improve documentation. Patch by Vincent Batts.
[Ruby 1.9 - Bug #4711]
	* lib/net/telnet.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16 22:09:23 +00:00
drbrain 3257aa8f8f * lib/net/http.rb: Fix nodoc for Net::HTTP::version_1_1?. Patch by
Alf Mikula.  [Ruby 1.9 - Bug #4713]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16 22:00:48 +00:00
nobu 3a47cf3395 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
akr afe7aac47b * lib/net/http.rb (Net::HTTP#connect): support SNI (Server Name
Indication) for HTTPS.  [ruby-dev:43164]
  http://stackoverflow.com/questions/4685736/openssl-server-name-indication-support-in-ruby


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-07 13:37:43 +00:00
naruse 2661691698 * lib/net/imap.rb: use bytesize for binary strings.
patched by Yoshimasa Niwa. [ruby-core:34222]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 05:57:50 +00:00
yugui ef0736604a * lib/net/http.rb (Net::HTTP#connect): makes it timeout during
SSL handshake too. [ruby-core:34203]
  Patch by Marc Slemko.

* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_timeout_during_HTTP_session):
  test for [ruby-core:34203]

* test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12 07:26:18 +00:00
tenderlove 9bc8ccf4d4 * lib/net/protocol.rb (eof?): BufferedIO should proxy eof? to the
underlying IO object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-06 00:24:45 +00:00
knu 0d375e732d * lib/net/http.rb (Net::HTTP#get): A header hash given should not
be modified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 04:58:57 +00:00
tenderlove 3971bc3c70 adding more tests for Net::SMTP::Response class
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-22 23:26:05 +00:00
tenderlove d236a0ca3b passing nil to split is not necessary
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-22 23:18:05 +00:00
tenderlove 0a2392a50a * lib/net/smtp.rb: refactoring Net::SMTP#esmtp= to use an
attr_accessor

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-22 23:13:49 +00:00
tenderlove 4a7f4d1f48 * lib/net/smtp.rb: Net::SMTP should close the SSL connection if the
connection verification fails.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-22 21:37:13 +00:00
naruse cba0d62d91 * lib/net/http.rb (Net::HTTPRequest#send_request_body_data):
set binmode to tempfile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-14 04:05:03 +00:00
naruse 1c9f703a47 * lib/net/http.rb (Net::HTTPRequest#set_form): Added to support
both application/x-www-form-urlencoded and multipart/form-data.
  There is a similar API, Net::HTTPRequest#set_form_data, but
  to keep its compatibility this is newly added. [ruby-dev:42729]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-13 01:04:37 +00:00
naruse d10fab3139 Add doc to warn the userinfo for auth. [ruby-core:33255]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-10 01:21:13 +00:00
naruse c37ca96692 * lib/net/http.rb: remove version 1.1 features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-10 01:08:45 +00:00
shugo fd019a5cbd * lib/net/imap.rb (xlist): supported the XLIST command, which is an
extension by Apple and Google.  patch by Geoff Youngs.
  [ruby-core:33521]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 08:07:12 +00:00
naruse f5bdc774fd * lib/net/http.rb (Net::HTTP#set_form_data):
use URI.encode_www_form for application/x-www-form-urlencoded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 01:46:45 +00:00
drbrain ec8f4038c9 Fix positional wording in lib/net/http.rb to match revised order
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01 17:31:20 +00:00
naruse 95bff6e828 Improve rdoc of net/http/http.rb.
* use URI(..)
* normalize Net::HTTP.start()
* use Net::HTTP.start(hostname, :use_ssl). Feature #2579

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01 16:40:16 +00:00
naruse 594633fbea * lib/net/http.rb: improve rdoc.
This change the order of chapter because such overview should
  begin with simple examples.
  patched by Eric Hodel [ruby-core:33469]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01 15:07:35 +00:00
naruse 4bded50f0d * lib/net/http.rb: improve rdoc.
patched by Eric Hodel ref #4100

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-30 08:06:19 +00:00
naruse 80c21e35cb * lib/net/http.rb: improve rdoc.
patched by mathew murphy [ruby-core:33472] ref #4100

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-30 02:56:14 +00:00
naruse baf7a09d35 * lib/net/http.rb: improve rdoc.
patched by Mike Perham [ruby-core:33433]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 19:22:53 +00:00
marcandre f3e3547407 * lib/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 20:59:01 +00:00
naruse 0d5a81f497 * lib/net/telnet.rb (Net::Telnet#close): added.
patched by Erik Hollensbe [ruby-dev:42260] #3830

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21 06:45:33 +00:00
naruse b1361d5be1 * lib/net/http.rb (transport_request): @socket may be nil.
patched by Egbert Eich [ruby-core:32829]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-18 01:20:37 +00:00
naruse 3f34ecc536 * lib/net/http.rb (HTTP.get): specify ASCII-8BIT as the result
encoding of Zlib::GzipReader.
  http://hibari.2ch.net/test/read.cgi/tech/1281473294/271

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-11 11:23:35 +00:00
akr 5fd45a4b79 * lib/uri/generic.rb (URI::Generic#hostname): new method.
(URI::Generic#hostname=): ditto.

* lib/open-uri.rb: use URI#hostname

* lib/net/http.rb: ditto.

  [ruby-core:32056]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-06 03:30:49 +00:00
nobu a55567a066 * lib/net/imap.rb: load io/console.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 05:50:54 +00:00
nobu 63a555ee4e * lib/net/imap.rb (example): use IO#noecho to read password if
possible, and defer until needed.  [ruby-dev:41889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 03:42:05 +00:00
nobu 2d8228c28e * lib/net/imap.rb (example): support starttls option.
[ruby-dev:41888]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 03:38:26 +00:00
naruse ab70e53ac3 * lib/net/http.rb: adding support to rfc5789 patch verb.
Added a Net::HTTP::Patch class which expects a message body
  and response body. It recycles the post method into a patch one,
  that will send the encoded representation to the server.
  Summarizing, a new class has been created, the post method
  extracted into send_entity, including a new argument,
  which defines which class to use (Post or Patch) and
  finally a patch method was created. [ruby-core:30426]
  Patched by Guilherme Silveira
  <guilherme.silveira AT caelum.com.br>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-01 12:30:52 +00:00
shugo f1ff36a331 * lib/net/imap.rb (disconnect): closes the socket of a Net::IMAP
object only when it is not closed.  [ruby-dev:41350]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19 14:22:09 +00:00
shugo e240f93f21 * lib/net/imap.rb (disconnect): terminates @receiver_thread even if
@sock.shutdown raises an exception.  [ruby-dev:34881]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08 23:25:54 +00:00
mame 57c1406697 * lib/net/http.rb (Net::HTTPResponse#read_chunked): ensure to skip the
last newline of chunk.  [ruby-core:29229]

* test/net/http/utils.rb: add an option for chunked response test.

* test/net/http/test_http.rb: add tests for chunked response.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 23:42:26 +00:00
nobu 6fd326e76c * lib/net/smtp.rb (Net::SMTP#rcptto_list): fixed typo.
[ruby-core:29809]


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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25 12:58:19 +00:00
nobu 2939d61f28 * 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/trunk@27374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16 23:57:43 +00:00
shugo 2587316c73 * lib/net/imap (encode_utf7): encode & properly. Thanks, Kengo
Matsuyama.  [ruby-dev:38063]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-14 04:00:09 +00:00
nobu c9dd4823d9 * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20 03:30:59 +00:00
shugo 0381cec507 * lib/net/ftp.rb (initialize): set @sock to a NullSocket instance to
raise FTPConnectionError when not connected.   [ruby-dev:40258]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06 15:26:20 +00:00
shugo 69c3348b79 * lib/net/imap.rb (receive_responses): does not hang when an unexpected BYE
response received.  fixed [ruby-core:27944].  Thanks, Bob Potter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06 13:57:10 +00:00
nobu 67244d1a70 * 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/trunk@26344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 06:49:46 +00:00
naruse 5ed5439af4 Add call-seq for Net::HTTP.start.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 06:32:14 +00:00
nobu 3b42acc8c1 * lib/net/http.rb (Net::HTTP.start): options may not be given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 07:48:48 +00:00
naruse b5227ae183 * lib/net/http.rb (Net::HTTP#start): add hash argument to
set ssl related options. when use_ssl is set default value
  of verify_mode is OpenSSL::SSL::VERIFY_PEER. [ruby-dev:40003]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 05:56:28 +00:00
naruse e0cdab5fff * lib/net/http, lib/net/https: move content from net/https to
net/http. [ruby-dev:39986]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 12:17:15 +00:00
shugo 64e6f141fa * lib/net/ftp.rb (putbinaryfile): use APPE for resume.
Thanks, Tomoyuki Chikanaga.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 14:21:05 +00:00
shugo 718ceb5476 * 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/trunk@25860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 13:56:23 +00:00
xibbar bed9e8e297 * lib/net/telnet.rb: don't use simple delegate.
because SimpleDelegate behavior changed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-12 14:03:03 +00:00
nahi a28cd28c04 * lib/net/http.rb (Net::HTTPResponse#each_response_header):
cosmetic: '?\ ' -> '?\s'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-31 08:18:32 +00:00
nahi d1cb4a5ba7 * 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/trunk@25579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30 13:09:03 +00:00
shugo 91c84cda9b * lib/net/ftp.rb (Net::FTP#initialize): sets @binary to true.
* lib/net/ftp.rb (Net::FTP#binary=): sends a TYPE command only when
  logged in. [ruby-dev:39548]
* lib/net/ftp.rb (Net::FTP#send_type_command): new private method
  which sends an appropriate TYPE command according to the value of
  @binary.
* lib/net/ftp.rb (Net::FTP#login): calls send_type_command instead
  of binary=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 04:09:20 +00:00
naruse 249569fd8e * lib/net/ftp.rb (Net::FTP#initialize): @sock = nil.
* lib/net/ftp.rb (Net::FTP#binary=): send command only when
  socket is open. [ruby-dev:39548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-27 13:50:42 +00:00
shugo 613a324f61 * lib/net/ftp.rb (getbinaryfile, list): call to_s to convert
a Pathname instance into a string.  [ruby-core:26237]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-27 06:47:41 +00:00
shugo b83a7c1076 * lib/net/ftp.rb (login): use "anonymous@" as a default password.
[ruby-dev:39451]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 14:29:05 +00:00
shugo 9994d05b7e * lib/net/ftp.rb (retrlines): added a new block parameter.
* lib/net/ftp.rb (gettextfile): preserve missing end-of-line at end
  of files.  [ruby-core:24590]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 13:52:37 +00:00
marcandre c2c679bc38 * 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/trunk@25263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-08 15:34:15 +00:00
marcandre 3a4e1d768d * 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/trunk@25097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 04:27:07 +00:00
marcandre b09845fa70 * lib/net/http.rb (each_*): return enumerator if no block present. Patch by Arthur Schreiber [ruby-core:18310]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 23:35:09 +00:00
marcandre a0c569a378 * lib/net/http.rb (fetch): Handle properly default values; a patch by Arthur Schreiber [ruby-core:18308]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 20:30:46 +00:00
shyouhei 607b8e0732 Merge branch 'trunk' of git://github.com/swdyh/ruby into trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11 01:44:05 +00:00
marcandre 8cdbe2ab6f * lib/net/http.rb (fetch): rdoc fix, patch by Arthur Schreiber, [ruby-core:18309].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 16:28:52 +00:00
shugo 9914a16ca9 * lib/net/imap.rb (idle): leaves IDLE in a ensure clause. a patch
from Eric Hodel.
* test/net/imap/test_imap.rb (setup, teardown): turn on
  Socket.do_not_reverse_lookup in tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-24 09:09:04 +00:00
shugo 4676ede3d1 * lib/net/imap.rb (resp_text_code): accepts response codes without
text.  [ruby-core:24194]
* lib/net/imap.rb (idle, idle_done): new methods for the IMAP4 IDLE
  command (RFC 2177).  Thanks, Eric Hodel.
* lib/net/imap.rb (format_date, format_datetime): new method to
  format IMAP-style date/datetime. Thanks, Eric Hodel.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-23 15:20:47 +00:00
shugo 00f5982e97 * lib/net/imap.rb: added response to Net::IMAP::ResponseError.
a patch from Eric Hodel in [ruby-core:24111].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-02 02:19:37 +00:00
nobu 63118829d9 * lib/net/protocol.rb (Net::BufferedIO#rbuf_fill): TimeoutError is
obsolete, use Timeout::Error instead.  [ruby-core:23821]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-12 21:50:35 +00:00
matz 0fa6bb37c6 * lib/net/smtp.rb (Net::SMTP#check_auth_args): should not change
number of methods for the sake of compatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10 23:56:22 +00:00
matz 587082d57c * lib/net/http.rb: documentation typo fixed. [ruby-core:23335]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-30 09:19:42 +00:00
akr c4049f4cb6 * io.c (rb_mWaitReadable): defined.
(rb_mWaitWritable): defined.
  (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and
  EAGAIN.

* error.c (make_errno_exc): extracted from rb_sys_fail.
  (rb_mod_sys_fail): new function.

* include/ruby/ruby.h (rb_mod_sys_fail): declared.
  (rb_mWaitReadable): declared.
  (rb_mWaitWritable): declared.

* ext/socket/init.c (rsock_s_recvfrom_nonblock): extend
  IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK,
  EAGAIN, ECONNABORTED and EPROTO.

* ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable
  on EINPROGRESS.

* ext/socket/ancdata.c (bsock_sendmsg_internal): extend
  IO::WaitWritable on EWOULDBLOCK and EAGAIN.
  (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and
  EAGAIN.

* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError
  extended by IO::WaitReadable/IO::WaitWritable on
  SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.

* ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise.
  (ossl_exc_new): new function.

* ext/openssl/ossl.h (ossl_exc_new): declared.

* lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and
  IO::WaitWritable.

  [ruby-core:22539], [ruby-dev:38140] 



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 11:40:38 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
akr 8746e342bc * lib/net/http.rb: suppress warnings of non-existing instance variable
access for SSL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28 07:19:55 +00:00
akr e14c9923b4 * ext/openssl: avoid cyclic require.
* ext/openssl/lib/openssl/ssl-internal.rb: renamed from ssl.rb

* ext/openssl/lib/openssl/x509-internal.rb: renamed from x509.rb.

* lib/net/imap.rb: require openssl, instead of openssl/ssl.

* lib/net/pop.rb: require openssl, instead of openssl/ssl.

[ruby-dev:38018]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:09:44 +00:00
knu df0f575e1d Fix grammos regarding the verb "refer".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 08:55:40 +00:00
kazu 22f6e2e771 fixed typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 07:30:52 +00:00
shugo 3f59f0e06c * lib/net/imap.rb: validate data before sending to a server.
[ruby-core:20320]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 05:14:26 +00:00
shugo bb9435a75c * lib/net/imap.rb (hmac_md5): should use String#ord to get ascii
code from the one-character string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 03:12:30 +00:00
matz d5bc38fdbf * lib/net/protocol.rb (Net::BufferedIO#rbuf_fill): avoid calling
read_nonblock in rescue.  use retry instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 15:24:54 +00:00
matz 85bae86cb6 * lib/optparse/version.rb: remove variable shadowing to stop
warning.   [ruby-core:20612]

* lib/irb/completion.rb, lib/net/imap.rb, lib/prime.rb,
  lib/rinda/ring.rb, lib/racc/parser.rb,
  lib/shell/command-processor.rb, lib/yaml/yamlnode.rb: ditto.

* lib/racc/parser.rb: remove space before parentheses.

* lib/shell/command-processor.rb, lib/shell/process-controller.rb:
  use parentheses around arguments.

* lib/irb/ext/change-ws.rb, lib/rexml/validation/relaxng.rb,
  lib/yaml/baseemitter.rb: indentation fix.

* lib/matrix.rb: small cosmetic change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 07:54:50 +00:00
matz 348d715eaa * lib/net/protocol.rb (Net::BufferedIO#rbuf_fill): use
read_nonblock instead of sysread wrapped by timeout to boost
  performance.  a patch from Aaron Patterson in [ruby-core:20191].
  fix #806

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 06:34:19 +00:00
matz e606e7e32b * 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/trunk@20249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 12:29:25 +00:00
kazu 0e0d05d5f4 * 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/trunk@19776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 02:22:46 +00:00
naruse a65d2e0574 * lib/net/http.rb (Net::HTTP#urlencode): str[0] returns char in 1.9.
Patch by Junegunn Choi [ruby-core:18368]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24 03:21:36 +00:00
kazu 2d302dfd40 * lib/webrick/server.rb (WEBrick::GenericServer#shutdown):
rescue Errno::ENOTCONN and close. [ruby-dev:35896]

* test/openssl/test_ssl.rb (OpenSSL#start_server): ditto.
  [ruby-dev:35897]

* lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 11:12:06 +00:00
aamine 47c8401c5a * lib/net/pop.rb: POP3Command should export @socket since POP calls #socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:09:08 +00:00
aamine 00b129c4e4 * lib/net/http.rb (send_request_with_body): Content-Length should be byte length of string. (closes #203)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:32:50 +00:00
aamine ae04e36638 * lib/net/https.rb: supress syntax warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:20:09 +00:00
aamine 08795f9ceb * lib/net/http.rb (Net::HTTP#initialize): initialize net/https variables to supress syntax warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:18:22 +00:00
shugo 16a24188cd * lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct
is not supplied.  fixed [ruby-core:18058].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 11:55:13 +00:00
shugo 1498b668d2 * lib/net/ftp.rb (chdir): handle 5xx errors correctly.
fixed [ruby-core:18057].


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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 07:24:48 +00:00
shyouhei 76ef6fa16b * 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/trunk@18351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04 05:46:53 +00:00
nobu 62dc500faf * lib/net/ftp.rb (Net::FTP#sendport): use divmod. [ruby-core:17557]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04 05:17:25 +00:00
matz 3819f8d156 * 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/trunk@17840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03 03:54:25 +00:00
kazu 2bcb0a1a35 * 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/trunk@17429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 11:42:05 +00:00
jeg2 b2c5258b85 * lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by changes to
the Kernel::Integer() method.  [ruby-core:17272]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17 14:04:48 +00:00
matz e6c1752137 * 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/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:37:38 +00:00
shugo 79fdbe0519 * lib/net/imap.rb: do not use Thread#raise. [ruby-dev:34739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 17:47:33 +00:00
jeg2 582983c224 * 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/trunk@16257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 14:57:40 +00:00
jeg2 e1bc480e98 * 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/trunk@16241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 11:14:52 +00:00
kazu 8cb17727c4 * lib/net/http.rb, lib/net/smtp.rb, lib/net/pop.rb: update URLs of Japanese documents.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 08:12:30 +00:00
matz 3d09c87ab5 * 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/trunk@15901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03 20:59:51 +00:00
naruse 40d8d38909 * ext/json/lib/json/pure/generator.rb,
ext/json/lib/json/pure/parser.rb, ext/openssl/lib/openssl/x509.rb,
ext/win32ole/sample/olegen.rb, lib/date/format.rb, lib/irb/context.rb,
lib/irb/workspace.rb, lib/net/http.rb, lib/net/imap.rb,
lib/rdoc/generator.rb, lib/rdoc/markup/to_html.rb,
lib/rdoc/markup/to_latex.rb, lib/rdoc/parsers/parse_c.rb,
lib/rdoc/ri/formatter.rb, lib/rexml/parsers/baseparser.rb,
lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rss/parser.rb,
lib/uri/common.rb, lib/uri/generic.rb, lib/webrick/httpresponse.rb,
lib/webrick/httpservlet/filehandler.rb, lib/yaml/baseemitter.rb,
lib/yaml/encoding.rb: performance tuning arround String#gsub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 06:18:06 +00:00
drbrain 2b402d8243 Fix uninitialized variable warning in Net::HTTP
Remove unused method in IRB::OutputMethod.

[ruby-talk:284582]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 20:47:11 +00:00
gotoyuzo 40aa32a0d7 * ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext.build): removed.
* ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext#set_params):
  new method to set suitable SSL parameters.

* lib/net/pop.rb, lib/net/http.rb, lib/net/imap.rb, 
  test/openssl/test_ssl.rb: follow above change.

* test/net/http/test_https.rb: refine error case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 08:31:53 +00:00
shugo e875cfa1fe * lib/net/imap.rb (encode_utf7): accept UTF-8 strings.
* lib/net/imap.rb (decode_utf7): return UTF-8 strings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 08:00:04 +00:00
shugo 3ee72c86ef * lib/net/imap.rb: fixed RDoc markups.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 07:29:01 +00:00
shugo 482690cdf8 * lib/net/imap.rb (initialize): fixed documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 06:05:14 +00:00
shugo a7ef0c7303 * lib/net/pop.rb (enable_ssl): use OpenSSL::SSL::SSLContext.build
instead of SSLContext.new (default verify mode is now
  OpenSSL::SSL::VERIFY_PEER).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 06:03:20 +00:00
shugo ad89f7e6d2 * lib/net/imap.rb (initialize): accept service name. changed
the defalut value of the old style +verify+ argument to true.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 06:34:03 +00:00
akr 4cf437519f * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c,
  ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb,
  ext/openssl/ossl_bn.c, numeric.c, vm.c,
  benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal"
  for non law violation context.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 02:31:11 +00:00
gotoyuzo c6920177f3 * lib/net/http.rb (Net::HTTP#connect): use
OpenSSL::SSL::SSLContext.build instead of SSLContext.new (default
  verify mode is now OpenSSL::SSL::VERIFY_PEER).

* lib/net/https.rb: SSL parameters are defined by attr_accessor.

* test/net/http/test_https.rb: add test for HTTPS features.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 16:21:22 +00:00
ko1 5c04ed459b * lib/net/imap.rb (initialize): the second argument is an option
hash now.  use SSLContext.build to specify SSL parameters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 10:41:50 +00:00
matz ff7f462bf4 * lib/net/http.rb (Net::HTTP::get): now supports gzip
content-encoding.  a patch from Hugh Sasse <hgs AT dmu.ac.uk>.
  [ruby-core:13451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10 16:53:52 +00:00
matz 1eee78b876 * eval.c (rb_f_send): allow send/__send__ to call methods of all
visibility again.  we no longer provide __send, __send!.

* eval.c (rb_invoke_method): new method to honor private
  visibility.  if it's invoked in a function call style, it calls
  private methods as well (previous 1.9 send behavior).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 20:36:20 +00:00
aamine fc8bd6d109 * lib/net/http.rb (HTTPHeader#initialize): provide default User-Agent to fix 500 error on some corrupted HTTP servers. [ruby-core:13135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 16:03:30 +00:00
jeg2 d520759f65 * 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/trunk@13781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 22:12:53 +00:00
jeg2 7c31f2a120 * 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/trunk@13779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 21:35:19 +00:00
matz 7f31a0e793 * lib/net/pop.rb (Net::POP3::do_start): type fixed. a patch from
Dan Zwell <dzwell AT zwell.net> in [ruby-core:12941].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 19:22:27 +00:00
gotoyuzo 3ecc791ddc * lib/net/imap.rb, lib/net/smtp.rb, lib/net/pop.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/trunk@13656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-08 11:14:41 +00:00
gotoyuzo a1455c75e9 * lib/net/http.rb: remove enable_post_connection_check flag.
* lib/open-uri.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-07 08:53:06 +00:00
shyouhei 11dc2b9641 lib/net/http.rb: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-24 07:55:41 +00:00
gotoyuzo 4f04f0372b * 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/trunk@13499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-23 22:21:18 +00:00
aamine 7dc5120630 * lib/net/http.rb (HTTP::GenericRequest#initialize): check path is not nil. [ruby-dev:31149]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-17 12:07:07 +00:00
matz 4e183b11ac * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize):
  initialize @workdir to stop warning.

* lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): 
  replace funcall by send!.  other files in the distribution as well.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24 09:57:53 +00:00
shugo 426fcba891 * lib/net/imap.rb (ResponseParser#next_token): fixed
error message.

* lib/net/imap.rb (ResponseParser#parse_error): fixed
the condition not to refer @token.symbol unexpectedly.
Thanks, Dick Monahan.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:39:07 +00:00
shugo 3306e785b5 * lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX
responses for some FTP servers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:25:32 +00:00
aamine 696cbbd7a6 * lib/net/smtp.rb: CRAM-MD5 authentication did not work. [ruby-dev:30770]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-20 18:33:25 +00:00
aamine 22d6ff16d3 * lib/net/http.rb (tokens): forgot to add strip. [ruby-core:11120]
* test/net/http/test_http.rb: test Net::HTTP.post_form.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-12 09:25:56 +00:00
aamine 9f1c215f5a * lib/net/http.rb (Net::HTTP.post_form): allow an Array of String for pairs argument. [ruby-Bugs:10340]
* lib/net/http.rb (Net::HTTP#set_form_data): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-06 09:43:26 +00:00
aamine 094d3b1d7c * lib/net/http.rb: Connection header field might include both of "keep-alive" token and "close" token. [ruby-core:10818]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-06 08:53:51 +00:00
shugo 6df7c0c721 * lib/net/imap.rb (disconnect): call shutdown for
SSLSocket. Thanks, Technorama Ltd.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-09 00:28:35 +00:00
aamine a7ec83b93a * lib/net/protocol.rb (rbuf_read): extend buffer size for speed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 02:27:08 +00:00
aamine 31015d2cca * lib/net/pop.rb: change default verification mode from VERIFY_PEER to VERIFY_NONE because most POPS server does not have true certification.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-16 13:32:41 +00:00
aamine ae2c8b45d2 * lib/net/http.rb: merge Ruby-SSPI patch contributed by Justin Bailey.
* ext/Win32API/lib/win32/sspi.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-16 13:17:10 +00:00
aamine 6dfd5fe953 * lib/net/smtp.rb: support automatic STARTTLS.
* lib/net/smtp.rb: check server advertisement.
* lib/net/smtp.rb: introduce new class SMTP::Response.
* lib/net/smtp.rb (getok): should not use sprintf.
* lib/net/smtp.rb (get_response): ditto.
* lib/net/protocol.rb: reduce syntax warning on 1.9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-05 00:17:38 +00:00
aamine 736f3c28b0 * lib/net/smtp.rb: reconstruct SMTPS/STARTTLS interface. New interface is incompatible from current 1.9 interface at all.
* lib/net/smtp.rb: All SSL-related class methods are removed; use instance methods instead.
* lib/net/smtp.rb: rename methods: *ssl -> *tls (with alias "ssl").
* lib/net/smtp.rb: rename methods: *tls -> *starttls.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-04 22:14:23 +00:00
shugo 0d59cd79cc * lib/net/ftp.rb: moved fixes for EPIPE to the correct
place. [ruby-core:10204]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 09:45:28 +00:00
shugo d4d5f27077 * lib/net/ftp.rb: check the control connection on EPIPE.
Thanks, Simon Williams. [ruby-core:9547]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 02:19:01 +00:00
shugo ffdb9dc6bd * lib/net/imap.rb: accept NOMODSEQ. [ruby-core:9002]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-04 04:13:34 +00:00
shugo 92d28f6b8f * lib/net/imap.rb: allow extra spaces in responses.
Thanks, Tom Soderlund.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-20 00:45:08 +00:00
aamine 575f94043f * lib/net/smtp.rb: parameter `to_addrs' might be an Array, .flatten is required. [ruby-dev:29316]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-22 10:21:31 +00:00
aamine a03909606e * lib/net/smtp.rb: support SMTP/SSL. Thanks Kazuhiro NISHIYAMA.
* lib/net/smtp.rb: new method SMTP.use_ssl?
* lib/net/smtp.rb: new method SMTP.enable_ssl.
* lib/net/smtp.rb: new method SMTP.disable_ssl.
* lib/net/smtp.rb: new method SMTP.default_ssl_port.
* lib/net/smtp.rb: new method SMTP.default_tls_port.
* lib/net/smtp.rb: now SMTP#enable_tls accepts a SSLContext object, instead of a verity and cert.  [FEATURE CHANGE]
* lib/net/smtp.rb: new method SMTP.ssl_context.
* lib/net/smtp.rb: new method SMTP.default_ssl_context.
* lib/net/smtp.rb: export SMTP.authenticate.
* lib/net/smtp.rb: export SMTP.auth_plain.
* lib/net/smtp.rb: export SMTP.auth_login.
* lib/net/smtp.rb: export SMTP.auth_cram_md5.
* lib/net/smtp.rb: export SMTP.starttls.
* lib/net/smtp.rb: export SMTP.helo.
* lib/net/smtp.rb: export SMTP.ehlo.
* lib/net/smtp.rb: export SMTP.mailfrom.
* lib/net/smtp.rb: export SMTP.rcptto.
* lib/net/smtp.rb: export SMTP.rcptto_list.
* lib/net/smtp.rb: export SMTP.data.
* lib/net/smtp.rb: export SMTP.quit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-15 02:21:59 +00:00
matz 2ff719fcd1 * lib/net/smtp.rb (Net::SMTP::auth_cram_md5): use ord to retrieve
bytes from strings.  a patch from WATANABE Tetsuya
  <Tetsuya.WATANABE at nifty.com>.  [ruby-dev:29240]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-09 07:56:30 +00:00
aamine 1c499989ee small document fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-26 13:27:18 +00:00
aamine e1173b2c78 * 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/trunk@10611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-26 13:00:26 +00:00
matz dd01cf9869 * 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/trunk@10368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-23 01:52:11 +00:00
aamine 6307996966 * lib/net/http.rb (send_request_with_body): #content_type never return false, use #main_type instead. [ruby-core:07476]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-05 09:35:32 +00:00
aamine 0ff14af9fa * lib/net/http.rb (add_field, get_fields): keep 1.8.2 compatibility. This patch is contributed by Rob Pitt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-05 09:50:38 +00:00
nobu 0cfe16bc21 * ext/tk/lib/tk/font.rb, ext/tk/lib/tkextlib/ICONS/icons.rb,
ext/tk/sample/tkextlib/treectrl/demo.rb, lib/net/imap.rb,
  lib/rss/parser.rb, test/rss/test_content.rb,
  test/rss/test_dublincore.rb, test/rss/test_syndication.rb,
  test/rss/test_trackback.rb, test/ruby/test_eval.rb,
  test/socket/test_socket.rb, test/socket/test_udp.rb:
  Object#fcall was renamed as Object#funcall.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 04:48:34 +00:00
shugo 65867866a8 * lib/net/ftp.rb: (getbinaryfile): allow nil for localfile, and
returns retrieved data if localfile is nil.
* lib/net/ftp.rb: (gettextfile): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-15 14:54:03 +00:00
shugo aa6393778a * lib/net/imap.rb: supported DIGEST-MD5. Thanks, Mathieu Arnold.
* lib/net/imap.rb: use fcall instead of send.  Thanks, Satoru
Takabayashi.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-16 23:05:13 +00:00
matz 1b644555ae * ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style
comment (//).  [ruby-core:05793]

* lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with
  readpartial.  [ruby-talk:127641]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-16 03:09:51 +00:00
aamine 97c7c50245 * lib/net/http.rb: wrote docuemntation of HTTPRequest/HTTPResponse classes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-13 06:41:59 +00:00
shugo 51e25545ae * lib/net/imap.rb (starttls): supported the STARTTLS command.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-11 14:26:27 +00:00
aamine bf96629711 * lib/net/http.rb: merge a patch contributed by Daniel Berger, with some modification. (RubyForge #2128)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26 13:05:31 +00:00
gotoyuzo 7fb6a09023 * lib/net/http.rb (Net::HTTP#connect, Net::HTTP#request): should
not send proxy username and password to origin servers.
  [ruby-dev:25673]

* lib/net/http.rb (Net::HTTP::ProxyDelta#edit_path): should not
  send HTTPS scheme URL to origine servers. [ruby-dev:25689]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-30 05:58:42 +00:00
aamine b6b8750a29 * lib/net/http.rb: add rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-20 16:53:27 +00:00
aamine 9d0758b3b0 * lib/net/http.rb: new method Net::HTTP.post_form.
* lib/net/http.rb: new method Net::HTTPHeader#set_form_data and its alias #form_data=.
* lib/net/http.rb: Net::HTTPHeader#add_header -> add_field (adjustted to Ruby 1.8).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-20 13:55:26 +00:00
shugo ec2e637cb4 * lib/net/imap.rb (initialize): handle certs correctly. Thanks,
NABEYA Kenichi.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-22 16:55:31 +00:00
shugo 90ad5e3699 * lib/net/imap.rb (decode_utf7): use pack("U*") to encode UTF-8.
* lib/net/imap.rb (encode_utf7): use unpack("U*") to decode UTF-8.
* test/net/imap/test_imap.rb: added tests for Net::IMAP.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-21 08:15:56 +00:00
shugo d3125e3e43 * lib/net/imap.rb (u8tou16): fixed typo. fixed: [ruby-lis:40546]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-21 05:02:16 +00:00
aamine 8af8ebfb92 update copyright year
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01 08:59:48 +00:00
aamine 94402f983f * lib/net/http.rb (each_capitalized): should join header field value. This patch is contributed sheepman [ruby-list:40478]
* test/net/http/test_httpheader.rb: test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01 08:45:50 +00:00
usa b19d1e1d98 * lib/net/telnet.rb (preprocess): remove NULL unless binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-28 08:22:37 +00:00
shugo 4394e19fdd * lib/net/imap.rb (Net::IMAP::PlainAuthenticator): added a new class
to support the PLAIN authentication mechanism. Thanks, Benjamin
  Stiglitz.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-26 07:26:15 +00:00
gotoyuzo 643dc13211 * lib/net/https.rb: delete descriptions about key_file and cert_file.
fixed: [ruby-dev:25243]

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20 05:46:45 +00:00
aamine 64b5b2b1a2 * lib/net/http.rb: remove junk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 18:27:44 +00:00
shugo 6e8ae612ba * lib/net/imap.rb (TEXT_REGEXP): allow 8-bit characters for the german
version of Microsoft Exchange Server.
* lib/net/imap.rb (RTEXT_REGEXP): ditto.
* lib/net/imap.rb (CTEXT_REGEXP): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-03 12:21:35 +00:00
aamine b79d77197f * lib/net/protocol.rb (rbuf_fill): OpenSSL::SSLSocket has its own buffer, select(2) might not work. [ruby-dev:24072]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-18 14:44:41 +00:00
shugo 26b9cd878a * lib/net/imap.rb (disconnected?): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-22 23:52:11 +00:00
shugo 73e0d386b8 * lib/net/imap.rb (receive_responses): return if a LOGOUT response
received.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-17 17:35:53 +00:00
shugo b9db231cbd * lib/net/imap.rb (send_string_data): wait command continuation
requests before sending octet data of literals.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-17 15:06:17 +00:00
matz 2c7c9e82df * ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname()
should give us packed address, not struct sockaddr.
  [ruby-core:03053]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-24 23:10:55 +00:00
shugo 77574f0fa2 * lib/net/imap.rb: added new option --ssl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-23 08:38:15 +00:00
shugo 9e9fdc1592 * lib/net/ftp.rb (binary=): send TYPE commands only once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-20 12:15:07 +00:00
shugo 87fb7bb66d * lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server.
Thanks, Rutger Nijlunsing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27 06:56:23 +00:00
aamine 36d86893c4 * lib/net/http.rb: support TRACE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18 17:29:55 +00:00
aamine b3e53ed154 * lib/net/http.rb: do not use class variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18 17:23:22 +00:00
akira 793b2e8795 * lib/net/telnet.rb (Net::Telnet::login): "options" can specify
regexps for login prompt and/or password prompt.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-13 07:02:18 +00:00
aamine 373747ab10 * lib/net/protocol.rb (each_crlf_line): remove junk line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-10 13:28:26 +00:00
aamine c9d3f3dd8a * lib/net/pop.rb (loggin): append "\n".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-09 16:19:35 +00:00
gsinclair d9c41de9cc * lib/net/ftp.rb: ported documentation improvement from 1.8 branch
* lib/net/imap.rb:   ditto
 * lib/net/pop.rb:    ditto
 * lib/net/smtp.rb:   ditto
 * lib/net/telnet.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-09 14:42:43 +00:00
matz 1b0f90ca33 * parse.y (string_content): turn off NODE_NEWLINE flag to avoid
unnecessary line trace for inlined expression.
  (ruby-bugs PR#1320)

* numeric.c (flo_to_s): tweak output string based to preserve
  decimal point and to remove trailing zeros.  [ruby-talk:97891]

* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
  search.  [ruby-talk:97342]

* hash.c (rb_hash_equal): returns true if two hashes have same set
  of key-value set.  [ruby-talk:97559]

* hash.c (rb_hash_eql): returns true if two hashes are equal and
  have same default values.

* string.c (rb_str_equal): always returns true or false, never
  returns nil. [ruby-dev:23404]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 08:44:24 +00:00
shugo 7cb6dfb8fc * lib/net/imap.rb (string): accept NIL.
* lib/net/imap.rb (body_type_basic): allow body-fields omissions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-06 02:47:37 +00:00
aamine 51ef45c6f3 * lib/net/smtp.rb: merge SMTP-TLS patch. This patch is contributed by Daniel Hob. [ruby-core:02789]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 09:40:48 +00:00
aamine ef36d75472 * lib/net/smtp.rb: change coding style: def m( a ) -> def m(a).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 09:23:56 +00:00
aamine 6562d8732d * lib/net/pop.rb: do not use class variables.
* lib/net/pop.rb (do_start): ensure to clean up connection when authentication failed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 09:02:04 +00:00
aamine d4f7c8ccef * lib/net/http.rb (connect): CONNECT must precede SSL connect. [ruby-dev:23379]
* lib/net/http.rb (HTTP.new): class variables are not inherited now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 08:26:33 +00:00
nobu 92f0be2037 * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb,
  lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb,
  lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb,
  lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb,
  lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb,
  lib/rinda/tuplespace.rb, lib/shell/command-processor.rb,
  lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb,
  lib/test/unit/testsuite.rb: typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18 23:19:47 +00:00
aamine a4e80a024d * lib/net/http.rb (begin_transport): should not overwrite HTTP request header. [ruby-list:39543]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-13 08:55:55 +00:00
aamine 500e181e20 * lib/net/pop.rb: merge POP3S patch. This patch is contributed by Daniel Hobe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-13 07:48:14 +00:00
matz 919f456de8 * exception message clean-up by Ian Macdonald <ian@caliban.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29 07:54:38 +00:00
aamine b81df5d837 * lib/net/pop.rb: def m( arg ) -> def m(arg).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-28 05:23:13 +00:00
aamine 0cf429ce82 * lib/net/pop.rb (auth): failed when account/password include "%". [ruby-talk:95933]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-28 05:17:13 +00:00
aamine 277839dc81 * lib/net/pop.rb: revert to rev1.63. 1.64 wrongly contains POPS code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-28 05:13:12 +00:00
aamine 111b11703d * lib/net/pop.rb (auth): failed when account/password include "%". [ruby-talk:95933]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-28 05:09:26 +00:00
aamine 2cb1399c8f * lib/net/http.rb: HTTPHeader did not initialized correctly.
* lib/net/http.rb (connect): does same debug output.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-08 14:16:21 +00:00
aamine 14371fce68 * lib/net/http.rb (add_header): remove warning. [ruby-dev:23170]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-08 12:40:34 +00:00
aamine 39848fe845 * lib/net/http.rb: HTTPHeader keeps its header fields as an array.
* lib/net/http.rb: new method HTTPHeader#add_header, get_fields.
* lib/net/http.rb: new method HTTPHeader#content_length=.
* lib/net/http.rb: new method HTTPHeader#content_type, main_type, sub_type, type_params, content_type=, set_content_type.
* lib/net/http.rb (HTTPHeader#basic_encode): result of pack(m) may contain multiple LFs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-06 20:35:19 +00:00
aamine 316bf4e67b * lib/net/http.rb: new method Net::HTTPRequest#body(=).
* lib/net/http.rb: new method Net::HTTPRequest#body_stream(=).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-06 18:11:40 +00:00
aamine 3eedf9156c * lib/net/http.rb: spin off https code again.
* lib/net/https.rb: new file.
* ext/openssl/lib/net/https.rb: removed.  moved to net/https with modifications.
* ext/openssl/lib/net/protocol.rb: removed.  merged with net/http.
* lib/net/protocol.rb: new class BufferedIO.
* lib/net/protocol.rb: InternetMessageIO < BufferedIO.
* lib/net/protocol.rb: BufferedIO.new takes an IO.
* lib/net/smtp.rb: follow InternetMessageIO's change.
* lib/net/pop.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-06 17:08:21 +00:00
aamine dd53813e38 * lib/net/protocol.rb: remove method: InternetMessageIO#address, port, ip_address, read_timeout(=), socket.
* lib/net/protocol.rb: simplify code.
* lib/net/protocol.rb: apply latest coding style.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-06 15:55:23 +00:00
aamine fc188d3827 * lib/net/http.rb: net/https is merged.
* ext/openssl/lib/net/https.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-05 17:00:51 +00:00
aamine 33a06e4aca * lib/net/http.rb: support WebDAV methods, PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE, COPY, MKCOL. This patch is contributed by Tatsuki Sugiura.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-05 14:13:31 +00:00
aamine a60a899eeb * lib/net/http.rb: Net::HTTPResponse#response is obsolete. [ruby-core:02592]
* lib/net/http.rb: Net::HTTPResponse#header is obsolete.
* lib/net/http.rb: Net::HTTPResponse#read_header is obsolete.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-05 11:59:09 +00:00
aamine 87275504ab * lib/net/http.rb (HTTPResponse#to_ary): should return an object which does not respond to #to_ary. It causes infinite loop in puts. [ruby-core:02578]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-05 10:42:43 +00:00
aamine d589b366bc * lib/net/protocol.rb (WriteAdapater#puts): must append "\n" to the string, don't prepend. (ruby-bugs:PR#1280)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-12 11:45:28 +00:00
aamine 992d2749ac * lib/net/http.rb (HTTP#request): should not overwrite Connection header. (ruby-bugs:PR#1274)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-08 05:24:47 +00:00
gsinclair 9670d71ba9 From ruby_1_8 branch:
* lib/test/unit.rb: rearranged documentation for RDoc's sake.
 * lib/matrix.rb: improved documentation.
 * lib/net/http.rb: slight documentation formatting improvement.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-01 09:27:17 +00:00
aamine 784360a978 * lib/net/http.rb (Request#initialize): reject only when a path is empty. [ruby-dev:22771]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-29 10:28:39 +00:00
shugo edddc36970 * lib/net/imap.rb (BEG_REGEXP): allow 8-bit characters in quoted strings for Novell GroupWise Internet Agent.
* lib/net/imap.rb (DATA_REGEXP): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-22 14:01:15 +00:00
matz 002517aba8 * parse.y (newline_node): do not use NODE_NEWLINE node anymore,
use NEWLINE flag instead.

* ext/socket/socket.c (sock_gethostbyname): returns host if
  ai_canonname is NULL. (ruby-bugs PR#1243)

* parse.y (block_append): update nd_end for "real" head node.
  [ruby-list:39058]

* marshal.c (w_class): should not dump singleton class.
  [ruby-dev:22631]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21 16:47:23 +00:00
shugo a2f60e923e * lib/net/imap.rb (envelope): allow NIL.
* lib/net/imap.rb (body): ditto.
* lib/net/imap.rb (number): ditto.
* lib/net/imap.rb (ensure_nz_number): show a detailed error
message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21 09:01:23 +00:00
aamine 7050611cf9 * lib/net/http.rb (HTTPHeader#content_length): should return nil unless header exists. [ruby-dev:22519]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07 11:42:21 +00:00
aamine ef70baa40a * lib/net/http.rb (GenericRequest#initialize): check if path begins with '/'.
* lib/net/http.rb: def m( arg ) -> def m(arg)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29 11:08:47 +00:00
shugo e34f7ef3cc * lib/net/imap.rb (authenticate): remove "\n" from base64 encoded
strings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24 04:44:25 +00:00
dave 5076ed519b Document Class and Dir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 15:18:09 +00:00
aamine ad592fa016 * lib/net/http.rb: update hyperlink to the Japanese document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-04 01:27:39 +00:00
aamine 44cc15a9a8 * lib/net/http.rb: wrote the warning about HTTP_PROXY environment variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-02 14:18:49 +00:00
aamine 39a97bf003 * lib/net/http.rb (to_ary): print more friendly warning message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-19 05:45:44 +00:00
aamine 5af1243076 * lib/net/protocol.rb: logging response body. [experimental] [ruby-list:38800]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-16 03:16:42 +00:00
aamine 5abcd32d57 * lib/net/http.rb (set_debug_output): last commit was wrong.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-16 00:48:17 +00:00
aamine d4060e0467 * lib/net/http.rb (set_debug_output): warn if method is called after #start. [ruby-dev:38798]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-16 00:46:16 +00:00
matz 8ef5da3be1 consistent parentheses in assignment RHS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-16 17:47:19 +00:00
aamine e377a12bff * lib/net/http.rb (finish): revert to 1.93.
* lib/net/pop.rb (finish): revert to 1.60.
* lib/net/smtp.rb (finish): revert to 1.67.
* lib/net/http.rb (do_start): ensure to close socket if failed to start session.
* lib/net/pop.rb (do_start): ditto.
* lib/net/smtp.rb (do_start): ditto.
* lib/net/smtp.rb: SMTP#started? wrongly returned false always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 18:12:20 +00:00
aamine 819e8e6c82 * lib/net/http.rb (finish): does not raise IOError even if !started?, to allow duplicated #finish call.
* lib/net/pop.rb (finish): ditto.
* lib/net/smtp.rb (finish): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 14:39:54 +00:00
gsinclair 50ca9237b3 * lib/net/http.rb: cosmetic improvements to documentation
* lib/net/imap.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31 13:04:25 +00:00
aamine e1a6b435db * lib/net/smtp.rb (check_response): AUTH CRAM-MD5 returns 334 response. [ruby-list:38279]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-27 06:08:14 +00:00
gsinclair be7c88a3e2 Small documentation update, including source attribution.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-21 09:56:21 +00:00
gsinclair f3f7c40c49 Small changes to documentation; mainly hiding things from RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-21 09:07:57 +00:00
gsinclair 8eb6b7328e RD -> RDoc by William Webber
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-11 22:42:08 +00:00
gsinclair 08a96d4380 RD -> RDoc by William Webber
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06 11:37:55 +00:00
aamine 5ae5596491 * lib/net/http.rb: update document.
* lib/net/pop.rb: ditto.
* lib/net/protocol.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-05 16:12:05 +00:00
gsinclair e6c23c67e9 RDoc updated by William Webber
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-05 14:48:33 +00:00
gsinclair 717848493c RDoc comments provided by William Webber <wew@williamwebber.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-05 13:22:20 +00:00
shugo 594eb2e0fe * lib/net/imap.rb (receive_responses): raise exception to
client_thread. Thanks to William Webber.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-04 01:02:16 +00:00
shugo 79c0605534 * lib/net/imap.rb: convert RD to RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-04 00:46:06 +00:00
aamine ce3fb6ceea * lib/net/smtp.rb: respond_to? needs 2nd argument. [ruby-talk:77796]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02 10:12:22 +00:00
aamine b1139297c3 * lib/net/http.rb: refine document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 15:41:41 +00:00
aamine a2ef7ef62c * lib/net/http.rb: convert RD to RDoc. Thanks William Webber. [ruby-doc:456]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 14:01:14 +00:00
shugo 1358ec597b * lib/net/ftp.rb (return_code): obsolete.
* lib/net/ftp.rb (last_response_code): new method. lastresp is now
alias to last_response_code.
* lib/net/ftp.rb (last_response): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 15:28:20 +00:00
shugo e155879b46 * lib/net/ftp.rb (get): fix wrong argument name. Thanks to William
Webber.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 01:56:45 +00:00
gsinclair e078a75b73 Small documentation correction.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29 14:27:26 +00:00
aamine f1d9d32a67 * lib/net/smtp.rb (send0): do taint check only when $SAFE > 0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29 13:29:53 +00:00
aamine 23301726b0 * lib/net/smtp.rb: unify coding style.
* lib/net/http.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29 09:48:30 +00:00
matz 37b2487c70 * lib/net/smtp.rb (Net::SMTP::send0): add taint check.
* ruby.h (LLONG_MIN): wrong value.

* io.c (rb_f_getc): $stdin may not be IO. [ruby-dev:20973]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29 07:52:55 +00:00
matz dbe85f1ef0 * string.c (rb_str_chomp_bang): defer rb_str_modify() to actual
modify point.  other methods, replace, tr, delete, squeeze,
  lstrip, and rstrip as well.

* string.c (rb_str_rstrip_bang): remove trailing '\0' at the end
  of string.

* string.c (rb_str_lstrip_bang): do not strip '\0' from the left.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-27 17:20:29 +00:00
matz fe4de8b4b8 * string.c (rb_str_match2): add warning to "~string".
[ruby-list:37751]

* lib/net/ftp.rb (Net::FTP::open): takes block.  suggested by Gavin
  Sinclair in [ruby-core:01237].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-19 17:26:04 +00:00
aamine f261bdf66c * lib/net/smtp.rb: synchronize document with source code.
* lib/net/pop.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-02 02:39:53 +00:00
aamine c20ecb1ba4 * lib/net/smtp.rb: unify SMTP and SMTPCommand.
* lib/net/smtp.rb: new exception class SMTPError.
* lib/net/smtp.rb: new exception class SMTPAuthenticationError.
* lib/net/smtp.rb: new exception class SMTPServerBusy.
* lib/net/smtp.rb: new exception class SMTPSyntaxError.
* lib/net/smtp.rb: new exception class SMTPFatalError.
* lib/net/smtp.rb: new exception class SMTPUnknownError.
* lib/net/smtp.rb: change critical section protect algorithm.
* lib/net/smtp.rb (SMTP#do_start): check authentication args before all.
* lib/net/smtp.rb: new method send_message (alias send_mail).
* lib/net/smtp.rb: new method open_message_stream (alias ready).
* lib/net/pop.rb: POPBadResponse is a POPError.
* lib/net/pop.rb (POPMail#pop): ban ReadAdapter.
* lib/net/pop.rb (POPMail#top): ditto.
* lib/net/pop.rb (POP3Command): change critical section protect algorithm.
* lib/net/pop.rb (POP3Command#auth): USER and PASS should be one critical block.
* lib/net/pop.rb (POP3Command#retr): ban `dest' argument using iterator.
* lib/net/pop.rb (POP3Command#top): ditto.
* lib/net/protocol.rb: #read_message_to -> #each_message_chunk
* lib/net/protocol.rb: #D -> #LOG
* lib/net/protocol.rb: #D_off -> #LOG_off
* lib/net/protocol.rb: #D_on -> #LOG_on


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-02 02:34:39 +00:00
aamine f473140e62 * lib/net/http.rb: set old class aliases for backward compatibility. [ruby-talk:74863]
* lib/net/protocol.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-02 02:05:35 +00:00
eban 2e4fc59d1c * lib/net/pop.rb (Net::POP3#start): typofix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-01 16:34:58 +00:00
aamine 170aaabe4b * lib/net/http.rb (HTTPHeader#proxy_basic_auth): missing `@'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-24 07:42:46 +00:00
matz 590a37880c * eval.c (proc_alloc): re-unification of Block and Proc. Block
class is no longer available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16 07:14:50 +00:00
shugo e0a5ffa941 * lib/net/ftp.rb (storebinary): seek correctly. Thanks, William Webber.
* lib/net/ftp.rb (putbinaryfile): rescue FTPPermError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-13 00:26:51 +00:00
aamine 1fa5c630cd * lib/net/http.rb: define Net::HTTPResponse#to_ary for backward compatibility. [ruby-talk:72927]
* lib/net/protocol.rb: add warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06 07:05:52 +00:00
matz c5fc4bca6d * eval.c (rb_call_super): inheritance line adjustment moved from
rb_call(). [ruby-core:01113]

* eval.c (rb_eval): use rb_call_super() to follow DRY principle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03 09:40:21 +00:00
aamine d5d2ca754b * lib/net/smtp.rb: support LOGIN authentication. The patch is contributed by Kazuhiko Izawa. [ruby-talk:78981]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-24 18:24:26 +00:00
aamine ee6a0ecbcb * lib/net/http.rb (Net::HTTP#start): should check whether HTTP session is opened before finishing. (ruby-bugs-ja:PR#463)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-14 03:20:16 +00:00
aamine 445c938f7b * lib/net/http.rb: reduce warning. (ruby-bugs-ja:PR#462)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-14 00:11:25 +00:00
shugo 46b2fa3ef4 * net/imap.rb: use DataFormatError in u16tou8/u8tou16.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-10 07:55:57 +00:00
shugo afb9ea97ea * lib/net/imap.rb (decode_utf7): new method.
* lib/net/imap.rb (encode_utf7): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-10 07:19:35 +00:00
aamine 273a14a44c * lib/net/pop.rb: rename method: POP3#mail_size -> n_mails
* lib/net/pop.rb: rename method: POP3#bytes -> n_bytes


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-06 08:48:51 +00:00
aamine 55d9858060 * lib/net/smtp.rb: ESMTP -> SMTP transition wrongly fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 06:18:19 +00:00
aamine af9bb04a6f * lib/net/pop.rb: APOP did not work. [ruby-dev:20149]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 06:04:03 +00:00
aamine e221d6826a * lib/net/protocol.rb: reintroduce Protocol.protocol_param.
* lib/net/http.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/smtp.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-02 15:19:20 +00:00
aamine e3056c8803 * lib/net/protocol.rb: remove Protocol class.
* lib/net/smtp.rb (SMTP): ditto.
* lib/net/pop.rb (POP3): ditto.
* lib/net/http.rb (HTTP): ditto.
* lib/net/protocol.rb: remove Command class.
* lib/net/smtp.rb (SMTPCommand): ditto.
* lib/net/pop.rb (POP3Command): ditto.
* lib/net/pop.rb: remove APOPCommand class.
* lib/net/protocol.rb: remove Code class and its all subclasses.
* lib/net/protocol.rb: remove Response class and its all subclasses.
* lib/net/pop.rb (POPMail): new method unique_id (alias uidl).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-02 14:35:01 +00:00
shugo d9d40c0d79 * net/imap.rb: support THREAD extension.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-30 05:50:24 +00:00
aamine 95eb316d44 * lib/net/pop.rb: Exception line was accidentaly removed. [ruby-dev:19989]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-10 12:15:33 +00:00
gsinclair 8369db4b3b Added comment for Net::HTTP.get(arg1, arg2, arg3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 03:20:13 +00:00
aamine d5ca993bc3 * lib/net/smtp.rb: Digest string wrongly included '\n' when user name is too long (ruby-bugs-ja:PR#404).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-11 11:54:30 +00:00
aamine cacf41f3b6 * lib/net/http.rb: speeding up by avoiding extra flush. (suggested by Brian Candler <B.Candler@pobox.com>)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-11 11:01:22 +00:00
aamine 70b55f2018 * lib/net/pop.rb: do not dispatch LIST when a mailbox is empty.
* lib/net/pop.rb: merge the 'STAT' patch from Frank S.Fejes <frank@oopdreams.com>, with modifications (listed below).
* lib/net/pop.rb: new method Net::POP#mail_size.
* lib/net/pop.rb: new method Net::POP#bytes.
* lib/net/pop.rb: new method Net::POPCommand#stat.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-09 16:53:30 +00:00
aamine e3ab724e00 * lib/net/http.rb: 4xx raises Net::ProtoServerError, 5xx raises Net::ProtoFatalError (for backward compatibility).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-08 23:29:07 +00:00
gsinclair e58e5cb5ca Added RDoc comments. See comments at EOF for remaining issues.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-31 14:33:42 +00:00
wakou 2c5e792dd2 * lib/net/telnet.rb: Telnet#print not add "\n".
* lib/cgi.rb: cgi['key'] is equal cgi['key'][0]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-26 17:48:29 +00:00
aamine f80af5150a * lib/net/smtp.rb: changes coding style.
* lib/net/pop.rb: ditto.
* lib/net/protocol.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:50:09 +00:00
aamine 15911a95bf * lib/net/http.rb: unify coding style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:13:17 +00:00
aamine 3eea2999e7 * lib/net/http.rb: should not overwrite Host: header. (Original patch is contributed by sean@ruby-lang.org)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:01:22 +00:00
aamine 87239525c1 * lib/net/http.rb: support Proxy-Authorization. (Original patch is contributed by Alexander Bokovoy)
* lib/net/http.rb: should not overwrite Host: header. (Original patch is contributed by sean@ruby-lang.org)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 10:59:50 +00:00
matz 66d1582c07 * object.c (rb_str_to_dbl): RString ptr might be NULL.
* object.c (rb_cstr_to_dbl): p pointer might be NULL.

* bignum.c (rb_str_to_inum): RString ptr might be NULL.

* bignum.c (rb_cstr_to_inum): str pointer might be NULL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 07:27:00 +00:00
nobu 29cef5f795 use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 16:45:35 +00:00
matz 89dbf99bac * numeric.c (num_to_int): default to_int implementaion for every
numeric class.

* re.c (rb_reg_quote): initial part of the string was never copied
  to the quoted string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-29 06:14:10 +00:00
shugo 03b60c7068 * lib/net/ftp.rb (set_socket): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-18 02:52:48 +00:00
aamine fa848fb6fd * lib/net/http.rb: rename HTTP.get_uri get_response.
* lib/net/http.rb: HTTP.get_print accepts URI objects.
* lib/net/http.rb: HTTP.get did not work with URI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11 21:33:38 +00:00
matz be1d2c5f68 * string.c (rb_str_slice_bang): if there's no corresponding
substring, slice! should return nil without exception.

* array.c (rb_ary_insert): type fixed.

* string.c (rb_str_split_m): accept separator value nil as well.

* string.c (rb_str_become): was leaking memory.

* class.c (rb_include_module): should not alter other
  classes/modules by inclusion.  by this fix, local order may not
  be preserved for some cases.

* class.c (include_class_new): module may be T_ICLASS; retrieve
  original module information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11 08:22:18 +00:00
shugo 8e346d8cb1 * lib/net/ftp.rb (get): new method.
* lib/net/ftp.rb (putt): ditto.
* lib/net/ftp.rb (binary): ditto.
* lib/net/ftp.rb (binary=): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-03 05:28:01 +00:00
shugo 9620b20227 * lib/net/ftp.rb (getbinaryfile): the second argument (localfile)
is now optional.
* lib/net/ftp.rb (gettextfile): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-03 04:59:24 +00:00
shugo f930648ae5 * lib/net/ftp.rb: use &block and yield for speed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-03 04:49:54 +00:00
shugo a5fd4cec84 * lib/net/ftp.rb (noop): new method.
* lib/net/ftp.rb (site): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 04:20:11 +00:00
aamine 1ea1fbe85d * lib/net/http.rb: HTTP.get accepts URI.
* lib/net/http.rb: add some HTTP 1.1 response codes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26 11:18:02 +00:00
aamine b90b70d734 net/protocol.rb: Protocol#start should return self.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 05:24:00 +00:00
shugo 4a58b0fd7c * lib/net/imap.rb: added document.
* lib/net/imap.rb (getquotaroot): new method.
* lib/net/imap.rb (setacl): remove the rights if the rights
parameter is nil.
* lib/net/imap.rb (getacl): return a MailboxACLItem object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-01 02:27:37 +00:00
aamine d80b8cd59e modify typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-22 12:54:11 +00:00