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

339 Коммитов

Автор SHA1 Сообщение Дата
shugo 237c2211e6 * test/net/imap/test_imap.rb (test_exception_during_idle): use timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06 12:31:59 +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
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 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
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
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
nobu 00b4a3f9c4 * test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:44:39 +00:00
mame 7edda76f15 * test/net/http/test_http.rb (_test_request__file): specify encoding
explicitly.

* test/net/http/utils.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 18:02:24 +00:00
mame 8d4f4e25e5 * test/net/http/test_http.rb: compare encodings of two strings before
comparing themself, which suppress too big error output.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 14:49:39 +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
akr 786e7aba7f * test/io/nonblock/test_flush.rb: don't set Thread.abort_on_exception.
* test/net/imap/test_imap.rb: ensure disconnecting imap to terminate
  receiver thread..


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 17:18:09 +00:00
usa f7b12afff5 * test/net/imap/test_imap.rb: check OpenSSL definition before testing imaps.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30 20:58:31 +00:00
gotoyuzo e963ff1e98 * test/net/http/test_https.rb: should rescue LoadError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23 19:05:39 +00:00
shugo 018bdcadac * test/net/imap/test_imap.rb: added tests for SSL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 15:50:43 +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
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
gotoyuzo f2266fe471 * test/net/http/utils.rb: split TestNetHTTPUtils module from
test/net/http/test_http.rb. and start HTTP server in each test case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 14:46:52 +00:00
akr 0884b1d8b1 catch EOFError in a thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15 11:12:20 +00:00
akr 49f00d5d2d close socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15 11:04:30 +00:00
matz 67172a2401 * test/net/http/test_https_proxy.rb
(HTTPSProxyTest::test_https_proxy_authentication): initialize
  local variable 't' first.  [ruby-dev:32253]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-14 07:17:18 +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 429c03eb2a merge test cases with Ruby 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-26 13:23:40 +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
nobu ec12edb11c * lib/scanf.rb (Scanf::FormatSpecifier#letter, #width): use matched
substring directly.

* ext/nkf/lib/kconv.rb (Kconv.conv): get rid of nil.to_a.

* test/ruby/test_assignment.rb, test/ruby/test_iterator.rb: followed
  change of sample/test.rb.

* test/net/http/test_http.rb: removed superfluous splatting stars.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-08 10:45:52 +00:00
aamine 8e1d3e5498 * test/net/http/test_http.rb (teardown): ensure that Net::HTTP is version 1.2. [ruby-dev:27312]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 11:25:29 +00:00
aamine 74b34477e2 * test/net/http/test_http.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 02:45:02 +00:00
akr 261f8e0f73 skip test if openssl is not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-07 02:49:16 +00:00
akr 8a85b8bef1 fix another IPv6 issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03 20:40:39 +00:00
akr a1782f4e6a avoid IPv6 issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03 18:03:52 +00:00
akr 0ad0462183 add ML number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03 17:14:06 +00:00
akr ea0a08fddd set verify_mode to avoid a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03 16:49:56 +00:00
akr f7298a29ea add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03 16:11:40 +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 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
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
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 b33d3cfb41 * test/net/test_httpheader.rb: new file.
* MANIFEST: add test/net/test_httpheader.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07 11:52:14 +00:00