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