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

777 Коммитов

Автор SHA1 Сообщение Дата
naruse 58835a94ef * lib/net/http.rb (edit_path): use path which is absolute ftp url
on using ftp_proxy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-03 23:18:20 +00:00
shugo cd29e5fcef * lib/net/ftp.rb (chdir, delete, gettextfile, mdtm, mkdir, nlst,
putbinaryfile, puttextfile, rename, rmdir, size): support
  Pathname. Patch by Joe Rafaniello. [fix GH-828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 02:26:06 +00:00
hsbt 1a98f56ae1 * lib/net/http/header.rb: pass header names as symbols.
Patch by @DamirSvrtan [fix GH-805]
* test/net/http/test_httpheader.rb: added test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 11:09:44 +00:00
ayumin 1711e80cf1 Revert r49118 [Feature #10652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 11:36:35 +00:00
ayumin 68f7424bde * lib/net/http.rb (proxy_user): retrieve proxy user from http_proxy.
* lib/net/http.rb (proxy_pass): retrieve proxy password from http_proxy.
  Patch by Rafael dos Santos Silva. [fix GH-763]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 07:21:56 +00:00
hsbt a84bfcbf00 * lib/net/http.rb: More descriptive error message when net/http fails
to connect to a server. Patch by @xaviershay [fix GH-700]
* test/net/http/test_http.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 01:38:59 +00:00
hsbt 2743ad8c25 * lib/net/http.rb (Net::HTTP#send_request): there is no response body
with HEAD request. Patch by @rodrigosaito [fix GH-520]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 12:07:04 +00:00
naruse 0f7e301fe1 * lib/net/http/response.rb (Net::HTTPResponse): require one or more
spaces [Bug #10591].
  by leriksen <leif.eriksen.au@gmail.com>
  https://github.com/ruby/ruby/pull/782 fix GH-782
  NOTE: graph.facebook.com returns without SP Reason-Phrase.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 18:10:19 +00:00
shugo a0b80a4410 * lib/net/imap.rb: Fix undefined variable usage & refactor/DRY
code.  Patch by @aledovsky. [Fixes GH-770]

* test/net/test_imap.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-06 01:13:45 +00:00
naruse c7855be25c use clock_gettime to avoid object creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 08:22:35 +00:00
drbrain 711ece42cd * lib/net/http.rb: Do not attempt SSL session resumption when the
session is expired.  [Bug #10533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 07:09:48 +00:00
usa 9bbfca81ea * lib/net/imap.rb (Net::IMAP::ResponseParser::BEG_REGEXP): no need to use embbed
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 15:29:51 +00:00
svn 5a79fda5b4 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:32:45 +00:00
shugo 772e9778fb * lib/net/imap.rb (search_response): parse MODSEQ in SEARCH
responses properly.  [ruby-core:64203] [Bug #10112]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:32:15 +00:00
knu a87c88bcd4 Document that Net::IMAP#fetch will return nil instead of an emtpy array.
* lib/net/imap.rb (Net::IMAP#fetch): [DOC] Document that
  Net::IMAP#fetch will return nil instead of an emtpy array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 07:36:31 +00:00
normal 9bb7dfa247 normalize reference to Timeout::Error
From: John Bachir <j@jjb.cc>

* bootstraptest/test_io.rb (assert_finish):
  normalize rescue for Timeout::Error
* lib/net/ftp.rb (Net#read_timeout): ditto for doc
* lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass
* lib/webrick/httprequest.rb (_read_data): ditto for rescue
* sample/timeout.rb (p timeout): ditto for call
* test/drb/drbtest.rb (test_06_timeout): ditto
* test/ruby/test_readpartial.rb (test_open_pipe): ditto
* test/thread/test_queue.rb (test_queue_thread_raise): ditto
* thread.c (rb_thread_s_handle_interrupt): ditto for doc
  [ruby-core:65481] [misc #10339]

TimeoutError is a legacy constant, Timeout::Error is the canonical constant.
This patch normalizes all code and comments to reference Timeout::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 20:00:09 +00:00
hsbt 3e8515bf36 * lib/drb/drb.rb: use attr_reader instead of Module#attr.
[Feature #10172][ruby-core:64582]
* lib/irb/ruby-token.rb: ditto.
* lib/net/telnet.rb: ditto.
* lib/rdoc/ruby_token.rb: ditto.
* lib/thwait.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27 12:10:21 +00:00
hsbt ef4c25720a * lib/net/imap.rb: split executable code into sample directory.
* sample/net-imap.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 03:40:42 +00:00
hsbt c6efc649f8 * lib/net/imap.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 03:24:06 +00:00
naruse f01485b4ec * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead
of parser to handle IPv6 address. [Bug #9129]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 19:37:37 +00:00
naruse 90a16cb228 * lib/net/http/requests.rb (Net::HTTP::Options::RESPONSE_HAS_BODY):
OPTIONS requests may have response bodies. [Feature #8429]
  http://tools.ietf.org/html/rfc7231#section-4.3.7

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 19:20:28 +00:00
naruse 70a2eb6399 * lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#exec):
handle req['host'] in update_uri.

* lib/net/http/generic_request.rb
  (Net::HTTP::GenericRequest#update_uri):
  use req['host'] if it is explicitly set. Even if URI is given,
  it is already used for the initial value of req['host'].
  Therefore overwritten value should be respected. [Bug #10054]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 19:10:23 +00:00
naruse c165203564 * lib/net/http/generic_request.rb
(Net::HTTP::GenericRequest#update_uri):
  handle scheme, host, and port to reflect connection to @uri.

* lib/net/http.rb (Net::HTTP#begin_transport): move trivial handling
  to Net::HTTP::GenericRequest#update_uri.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 19:10:05 +00:00
naruse 159fa373f8 * lib/net/http/generic_request.rb
(Net::HTTP::GenericRequest#initialize):
  optimize object allocation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 19:09:43 +00:00
hsbt 448c87008e * lib/cgi/core.rb: remove unused variables.
* lib/erb.rb: ditto.
* lib/mkmf.rb: ditto.
* lib/net/http/response.rb: ditto.
* lib/optparse/version.rb: ditto.
* lib/prime.rb: ditto.
* lib/racc/parser.rb: ditto.
* lib/rexml/document.rb: ditto.
* lib/rexml/dtd/dtd.rb: ditto.
* lib/rexml/element.rb: ditto.
* lib/rexml/functions.rb: ditto.
* lib/rexml/parsers/xpathparser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27 11:04:28 +00:00
kosaki 00eb720394 * lib/net/smtp.rb (Net::SMTP#data): enable buffering while
'data' send for optimizing Net::SMTP#send_message.
  [ruby-dev:48329] [misc #9981]
  patch by Masahiro Tomita.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 19:22:19 +00:00
naruse d8a2c3c03f * lib/net/htp/response.rb (Net::Inflater#inflate_adapter):
prevent automatic encoding conversion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03 19:46:44 +00:00
naruse 6811973d13 * lib/net/http/response.rb (Net::HTTP.each_response_header):
raise first exception even if inflate_body_io.finish raises error.
  when begin block raises error, finish usually raises error too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03 19:46:34 +00:00
naruse 88df8816f1 change default not tot create useless object
initheader = initheader ? initheader.dup : {}

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03 17:59:49 +00:00
knu 4fa35e0e9d * lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in
+set+ is interpreted, and mention -1 which can be used for '*'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 08:46:11 +00:00
shugo 6479e0b04f * lib/net/ftp.rb (gets, readline): read lines without LF properly.
[ruby-core:63205] [Bug #9949]

* test/net/ftp/test_buffered_socket.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-17 07:44:53 +00:00
hsbt 595782b924 * lib/net/http/responses.rb: added Net::HTTPPermanentRedirect(308)
Contributed by @yorkie [fix GH-638]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-12 09:32:36 +00:00
shugo 87505dd771 * lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
type as "MIXED" followed immediately by params
	  [ruby-core:62864] [Bug #9885]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-03 04:19:57 +00:00
akr cbd370f669 * lib/net/imap.rb (Net::IMAP#initialize): Close the opened socket when
any exception occur.
  This fixes a fd leak by IMAPTest#test_imaps_post_connection_check
  which start_tls_session() raises an exception.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-28 10:02:54 +00:00
akr 569ca78e97 * lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
exception occur.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27 15:14:59 +00:00
nobu 1fd639393f net/protocol.rb: fix SMTP dot stuffing
* net/protocol.rb (using_each_crlf_line): fix SMTP dot-stuffing
  for messages not ending with a new-line.
  [ruby-core:61441] [Bug #9627] [fix GH-616]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-23 12:36:30 +00:00
hsbt 3fb8542b62 * lib/net/imap.rb: Proofreading docs. [ruby-core:61931][Bug #9720]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 07:34:23 +00:00
knu 537dac2713 * lib/net/ftp.rb (Net::FTP#login): [DOC] The default password for
anonymous login was changed to "anonymous@" in r25313.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-10 14:46:37 +00:00
hsbt 690be750cb * lib/cgi/html.rb: fix typo by @windwiny [fix GH-506]
*  lib/net/http.rb: ditto
*  lib/rexml/attribute.rb: ditto
*  lib/rexml/element.rb: ditto
*  lib/rexml/source.rb: ditto
*  lib/rexml/streamlistener.rb: ditto
*  lib/rss/xmlparser.rb: ditto
*  lib/rubygems/commands/generate_index_command.rb: ditto
*  lib/shell.rb: ditto
*  lib/uri/common.rb:ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 05:43:26 +00:00
zzak 7433ce3e8c * lib/net/smtp.rb: [DOC] Remove dead link to RAA by Giorgos Tsiftsis
Fixes the following bugs: [Bug #9152] [Bug #9268] [Bug #9394]
* lib/open-uri.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 05:49:12 +00:00
a_matsuda d8f619e1a7 * lib/net/pop.rb: [DOC] Fix typo
s/deguging/debugging/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 02:38:55 +00:00
naruse 91539d71d8 * lib/net/http/responses.rb:
Add `HTTPIMUsed`, as it is also supported by rack/rails.
  RFC - http://tools.ietf.org/html/rfc3229
  by Vipul A M <vipulnsward@gmail.com>
  https://github.com/ruby/ruby/pull/447 fix GH-447

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 17:11:46 +00:00
hsbt 5728783a04 * lib/net/http/header.rb: [DOC] Net::HTTP#to_hash returns pair of key and array values. Thanks @bjhaid [fix GH-467]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:33:16 +00:00
a_matsuda 1083b375ec * lib/net/smtp.rb: [DOC] Fix typo
s/raies/raises/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03 12:14:22 +00:00
drbrain 34e57abf23 * lib/net/smtp.rb (Net::SMTP#critical): Always return a
Net::SMTP::Response.  Patch by Pawel Veselov.
  [ruby-trunk - Bug #9125]
* test/net/smtp/test_smtp.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02 05:18:04 +00:00
zzak 8adbcb6634 * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
spelling typo, based on patch by @artfuldodger [Fixes GH-426]
  https://github.com/ruby/ruby/pull/426


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:38:18 +00:00
nobu 0be97c7015 range.c: revert r42400
* range.c (range_last): revert r42400.  [Bug #8739]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08 01:27:19 +00:00
nobu e667aaf4ca net/http/header.rb: remove a hack
* lib/net/http/header.rb (Net::HTTPHeader#set_range): remove a hack
  for the bug fixed at [Bug #8739].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 12:38:51 +00:00
naruse 044e75db6d fix r42168; Add class name to constants
[ruby-core:56158] [Feature #8681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25 09:33:12 +00:00
naruse 67d05682b0 * lib/net/http.rb (Net::HTTP#connect): disable Nagle's algorithm on
HTTP connection. [ruby-core:56158] [Feature #8681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25 08:54:32 +00:00
zzak c366a99cc5 * lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]
Patch by Dave Worth https://github.com/ruby/ruby/pull/341
* lib/webrick.rb: ditto
* lib/scanf.rb: ditto
* lib/xmlrpc/config.rb: ditto
* lib/resolv.rb: ditto
* lib/e2mmap.rb: ditto
* lib/fileutils.rb: ditto
* lib/mkmf.rb: ditto
* lib/cgi/session.rb: ditto
* lib/yaml.rb: ditto
* lib/erb.rb: ditto
* lib/irb.rb: ditto
* lib/tracer.rb: ditto
* lib/net/http.rb: ditto
* ext/syslog/lib/syslog/logger.rb: ditto
* sample/pty/expect_sample.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18 13:50:32 +00:00
hsbt fa7e514642 Fixing example in comments that raised an error by @JackDanger [fix GH-345]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-04 02:53:16 +00:00
shugo 61b8250adc * lib/net/imap.rb (capability_response): should ignore trailing
spaces.  Thanks, Peter Kovacs.  [ruby-core:55024] [Bug #8415]

* test/net/imap/test_imap_response_parser.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05 13:44:17 +00:00
kazu c54733e120 fix typos inspired by r40825
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 14:50:47 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
shugo 8541ed6df6 * lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
response correctly.  [ruby-core:54365] [Bug #8281]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-23 05:07:21 +00:00
shugo 3f927dec87 * lib/net/imap.rb (body_type_msg): should accept
message/delivery-status with extra data.
  [ruby-core:53741] [Bug #8167]

* test/net/imap/test_imap_response_parser.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-19 09:02:31 +00:00
hsbt c25aa9f5d6 Document the default Net timeout values by @toolmantim [GH fixes #269]
* lib/net/{ftp,http,pop,smtp}.rb: added documentation for default values.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 01:47:47 +00:00
hsbt 4edd787b14 cleanup by @vipulnsward [GH fixes #262]
lib/net/http/generic_request.rb: Removes unnecessary assignment
lib/net/ftp.rb: Fixes dead code


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22 11:57:51 +00:00
drbrain f2a13e60d9 * lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP
RSET command.  [ruby-trunk - Feature #5373]
* NEWS:  ditto.
* test/net/smtp/test_smtp.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-11 17:27:03 +00:00
drbrain 023561f704 * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.
[ruby-trunk - Bug #7924]
* test/net/http/test_http.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 06:15:05 +00:00
drbrain 64db9dcbd5 * lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.
* test/net/http/test_http.rb:  Remove Zlib dependency from tests.
* test/net/http/test_http_request.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 05:32:58 +00:00
drbrain f58d398075 * lib/net/http: Do not handle Content-Encoding when the user sets
Accept-Encoding.  This allows users to handle Content-Encoding for
  themselves.  This restores backwards-compatibility with Ruby 1.x.
* lib/net/http/generic_request.rb:  ditto.
* lib/net/http/response.rb:  ditto
* test/net/http/test_http.rb:  Test for the above.
* test/net/http/test_http_request.rb:  ditto.
* test/net/http/test_httpresponse.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 01:08:19 +00:00
zzak 45bcf5d46f * lib/net/http.rb (HTTP.post_form): Fix module scope in documentation
Patch by David Albert [Bug #7794] [ruby-core:51955]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 22:35:25 +00:00
zzak e91fb5eb6f * lib/net/smtp.rb: Fix rdoc title for Net::SMTP
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-02 04:37:45 +00:00
zzak 94839d4a80 * lib/net/pop.rb: Fix rdoc title for Net::POP3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-02 04:32:25 +00:00
akr 64dbc10b5f * lib/net/http/generic_request.rb (encode_multipart_form_data): remove
tempfile explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29 12:41:56 +00:00
naruse a1de1fa575 * lib/net/http/generic_request.rb:
Amazon ECA API and GTE/1.3 disallow requests whose host has port
  number if its port number equlas to default port number of the
  scheme. [Bug #7650]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05 15:04:48 +00:00
naruse 02253a7961 * lib/net/http/generic_request.rb (Net::HTTPGenericRequest):
set content-length to zero on empty post requests
  by Gregory Ostermayr <gregory.ostermayr@gmail.com>
  https://github.com/ruby/ruby/pull/201 fix GH-201

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 19:58:44 +00:00
drbrain 570b766901 * lib/net/http.rb: Requests may be created with a URI which sets the
Host header.  Responses contain the requested URI for easier redirect
	  following.  [ruby-trunk - Feature #6482]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto.j
	* NEWS (net/http):  Updated for above.
	* test/net/http/test_http.rb:  Tests for above.
	* test/net/http/test_http.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 20:36:07 +00:00
naruse 51ee08fd71 Suppress warning: uninitialized variable [ruby-core:50470] [Bug #7494]
Conditional operator is required to return true or false.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-04 01:01:37 +00:00
zzak 421d4f628b * lib/net/http.rb: Net::HTTP::Patch to list of HTTP Request Classes
Patch by Ryunosuke SATO [Fixes #217 on github]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 05:45:23 +00:00
nobu c3da426d10 remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 12:34:37 +00:00
glass df03463ff2 * lib/net/pop.rb (POP3.certs): fix typo in comment.
patch from no6v (Nobuhiro IMAI) <nov@yo.rim.or.jp>.
  [ruby-dev:46519] [Bug #7355]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 06:37:06 +00:00
naruse 6ce8c33936 * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-08 10:04:24 +00:00
naruse ccd7a805cc * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06 05:30:17 +00:00
nobu e6c5b9f308 revert r37326 "remove string literal concatenation"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 14:06:31 +00:00
nobu db1f7079b6 remove string literal concatenation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 10:07:22 +00:00
shugo bd6bb6c0b2 * lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
message/delivery-status ([ruby-core:47920] [Bug #7146]),
  message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
  (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).

* test/net/imap/test_imap_response_parser.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17 06:18:14 +00:00
drbrain d212a89c38 * lib/net/http/backward.rb (class Net): Restored Net::HTTPSession to
fix backwards-compatibility with ancient Net::HTTP.  [Bug #6889]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 22:42:12 +00:00
naruse b0837c440e Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 22:30:43 +00:00
nobu d059d718b5 remove trainling spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 04:50:18 +00:00
drbrain 7edb264586 * lib/net/.document: Removed. All files in net/ should be included in
RDoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 02:20:07 +00:00
drbrain ead728ca7d * lib/net/http.rb: Added SSL session reuse across connections for a
single instance to speed up connection.  [Feature #5341]
* NEWS:  ditto
* test/net/http/test_https.rb:  Tests for #5341


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 00:05:59 +00:00
naruse e2f75afbfb Set false to @proxy_from_env to suppress uninitialized warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 15:51:14 +00:00
naruse 07a6d0e9d1 * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
* lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
  not given.

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

* lib/net/http.rb (Net::HTTP#proxy?): return true or false.

* lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 15:45:10 +00:00
drbrain 9416becda4 * lib/net/http.rb: Net::HTTP now automatically detects and uses
proxies from the environment.  A proxy may also be specified as
  before.

  Net::HTTP::Proxy still creates anonymous classes, but these classes
  are only used to store configuration information.  When an HTTP
  instance is created the configuration is now copied.

  Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP

  [Feature #6546]
* lib/open-uri.rb:  Moved URI::Generic#find_proxy to uri/generic.
* lib/uri/generic.rb:  Imported find_proxy from open-uri.
* test/open-uri/test_open-uri.rb:  Moved proxy-discovery tests to URI.
* test/uri/test_generic.rb:  Imported proxy-discovery tests from
  open-uri.
* test/net/http/test_http.rb:  Added tests for proxy behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20 01:56:21 +00:00
drbrain b1a0509b54 * lib/net/http/response.rb: Automatically inflate gzip and
deflate-encoded response bodies.  [Feature #6942]
* lib/net/http/generic_request.rb:  Automatically accept gzip and
  deflate content-encoding for requests.  [Feature #6494]
* lib/net/http/request.rb:  Updated documentation for #6494.
* lib/net/http.rb:  Updated documentation for #6492 and #6494, removed
  Content-Encoding handling now present in Net::HTTPResponse.
* test/net/http/test_httpresponse.rb:  Tests for #6492
* test/net/http/test_http_request.rb:  Tests for #6494
* test/open-uri/test_open-uri.rb (test_content_encoding):  Updated test
  for automatic content-encoding handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19 22:43:38 +00:00
naruse 4689853711 * lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
if specified. patched by Ricardo Amorim [Feature #6617]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 18:37:18 +00:00
knu be53f329f7 Fix 4xx classes to inherit correctly from Net::HTTPClientError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05 03:31:31 +00:00
knu 3703619ed9 * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
response codes added in RFCs 2817 and 4918.  [ruby-core:45547]
  [Feature #6569]

* lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
  Net::HTTPMultipleChoices, leaving the former as alias to the
  latter for backward compatibitily.  [ruby-core:45547]
  [Feature #6569]

* lib/net/http/responses.rb: Add comments about unused,
  still-in-draft and private extension response codes.
  [ruby-core:45547] [Feature #6569]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 15:20:27 +00:00
knu a9e8b77697 * lib/net/http/response.rb: Remove a duplicated rdoc and leave a
pointer.

* lib/net/http/responses.rb: Add RFC numbers to base on.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 09:59:59 +00:00
drbrain 0d7a94e31d * lib/net/http/responses.rb: Add RFC 6586 response codes. Patch by
Sangil Jung.  [ruby-trunk - Feature #6480]
* lib/net/http/response.rb:  ditto
* lib/net/http.rb:  ditto
* lib/webrick/httpstatus.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-08 22:40:14 +00:00
naruse 3ba0abdb15 * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
HTTP Range request. Old one can't parse invalid specs and multiple
  specs correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 13:09:26 +00:00
drbrain 510bbe015d * lib/net/http.rb: Broke up Net::HTTP into individual files.
[ruby-trunk - Feature #6435]
* lib/net/http/backward.rb:  ditto.
* lib/net/http/response.rb:  ditto.
* lib/net/http/exceptions.rb:  ditto.
* lib/net/http/responses.rb:  ditto.
* lib/net/http/generic_request.rb:  ditto.
* lib/net/http/header.rb:  ditto.
* lib/net/http/request.rb:  ditto.
* lib/net/http/proxy_delta.rb:  ditto.
* lib/net/http/requests.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22 20:36:21 +00:00
naruse f6fb038dee * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
because transfercmd may fail and return nil.

* lib/net/ftp.rb (Net::FTP#retrlines): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 12:56:17 +00:00
naruse 52f0c6780e * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 02:27:07 +00:00
naruse d795f2d1a8 Shutdown gracefully.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 21:56:40 +00:00
shugo 2e63cd97c1 * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
Nobuyoshi Nakada, to use String#encode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 07:03:19 +00:00
shugo 9be3aa1767 * lib/net/imap.rb (body_type_attachment): parse body type
"ATTACHMENT". [ruby-core:44849] [Bug #6397]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 04:05:44 +00:00
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