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

147 Коммитов

Автор SHA1 Сообщение Дата
shugo 21e4ade56b lib/net/imap.rb: Accept continuation requests without response text
The IMAP server of DOCOMO returns such continuation requests.
[ruby-list:50558]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-27 06:32:00 +00:00
shugo ae91976d56 lib/net/imap.rb: support CHANGEDSINCE and MODSEQ
Patch by plehoux (Philippe-Antoine Lehoux).  [ruby-core:64272] [Feature #10119]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-26 07:47:34 +00:00
shugo 016586824f lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server
Based on the patch by keysen (Jérémy Carlier).
[ruby-core:81641] [Bug #13649]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-19 23:08:34 +00:00
shugo 27fb27ff42 net/imap: separate @continuation_request_exception from @exception
Otherwise literal data will be sent even if NO response is returned
because @exception is set to nil in receive_responses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-22 06:13:11 +00:00
svn 940f32eb5d * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-19 09:25:53 +00:00
shugo 84c1596342 net/imap: Net::IMAP#append should not block when NO response is received
[ruby-dev:50129] [Bug#13579]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-19 09:25:52 +00:00
shugo 5bf395f4cb net/imap: Revert read_tiemout in r58549.
get_response is called in a receiver thread, so there may be no pending
commands when get_response is called.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 09:39:23 +00:00
shugo cea73b2df9 net/imap: Net::IMAP#disconnect need not do anything if already disconnected
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-11 07:56:52 +00:00
shugo 8b51a725db net/imap: handle timeouts
Patch by Pavel Rosický.  [Feature #13379] [ruby-core:80440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 11:32:22 +00:00
normal f845a9ef76 lib/*: remove closed checks
Follow r56795.  Since Ruby 2.2, calling #close on a closed
socket no longer raises exceptions.

* lib/cgi/session.rb (update): remove closed? check
* lib/net/http.rb (finish, transport_request): ditto
* lib/net/imap.rb (disconnect): ditto
* lib/net/pop.rb (do_start, do_finish): ditto
* lib/net/smtp.rb (do_start, do_finish): ditto
* lib/open3.rb (popen_run, pipeline_run): ditto
* lib/pstore.rb (transaction): ditto
* lib/shell/process-controller.rb (sfork):
* lib/tempfile (_close, call, Tempfile.create): ditto
* lib/webrick/httpauth/htdigest.rb (flush): ditto
* lib/webrick/httpauth/htpasswd.rb (flush): ditto
* lib/webrick/server.rb (start_thread, cleanup_shutdown_pipe): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21 23:05:41 +00:00
normal 778bbac8ac stdlib: avoid extra calls to eliminate "\n" from Base64
We may use the '0' (zero) to avoid adding the line feed.
Furthermore, the '*' (asterisk) modifier is not needed for
a single-element arrays.

* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
  eliminate chomp
* lib/net/http.rb (connect): eliminate delete
* lib/net/http/header.rb (basic_encode): ditto
* lib/net/imap.rb (authenticate): eliminate gsub
  (self.encode_utf7): shorten delete arg
* lib/net/smtp.rb (base64_encode): eliminate gsub
* lib/open-uri.rb (OpenURI.open_http): eliminate delete
* lib/rss/rss.rb: ditto
* lib/securerandom.rb (base64): ditto
  (urlsafe_base64): eliminate delete!
* lib/webrick/httpauth/digestauth.rb (split_param_value):
  eliminate chop
* lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete
  (setup_upstream_proxy_authentication): ditto
  [ruby-core:72666] [Feature #11938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-10 00:35:43 +00:00
a_matsuda 3a05da1321 [DOC] Fix typos
* benchmark.rb
* getoptlong.rb
* irb.rb
* net/http.rb
* net/http/header.rb
* net/imap.rb
* optparse.rb
* pstore.rb
* webrick.rb
* xmlrpc.rb

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23 03:43:23 +00:00
shugo e0ea5e903b * lib/net/imap.rb: remove an empty comment line and -*-.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:29:08 +00:00
shugo 68fc350abe * lib/net/imap (idle): add a new argument timeout for keep-alive.
[ruby-core:63693] [Bug #10031]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 09:32:19 +00:00
shugo 5a0f41a588 * lib/net/imap.rb: use frozen_string_literal: true.
* test/net/imap/test_imap.rb: ditto.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:42:34 +00:00
shugo f954f0d840 * lib/net/imap.rb (body_ext_mpart): should work even if body-fld-dsp
is omitted.  [ruby-core:69093] [Bug #11128]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-08 06:46:18 +00:00
shugo c8cb2598d1 * lib/net/imap.rb (move, uid_move): support the MOVE command defined
in RFC6851.  Patch by ojab ojab.
  [ruby-core:68960] [Feature #11077]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-22 09:43:55 +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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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