naruse
bab5bf0c79
* lib/net/http.rb (Net::HTTP#connect): use connect_nonblock and
...
io/wait. fix GH-899
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15 02:11:20 +00:00
normal
16aeffefa2
lib/*: use monotonic clock for timeouts
...
The monotonic clock is preferred as it is guaranteed to be
continuous and not subject to jumps due to adjustments.
* lib/net/resolv.rb (request): use monotonic clock
* lib/net/http.rb (begin_transport, end_transport): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-29 01:40:26 +00:00
hsbt
0b5ecba435
* lib/net/telnet.rb: gemify net-telnet.
...
[Feature #11083 ]
* gems/bundled_gems: added net-telnet to bundled gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21 06:46:14 +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
hsbt
325a50fc57
* ext/openssl/*: use license instead of licence.
...
[fix GH-876][ci skip] Patch by @davydovanton
* lib/net/https.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20 03:55:09 +00:00
normal
b90ad8a2f6
lib/net/*: use io/wait methods instead of IO.select
...
io/wait is expected to work on any platform where sockets are
supported. io/wait methods uses fewer allocations and uses
ppoll internally under Linux for better performance on
high-numbered FDs.
[ruby-core:35572] describes the performance advantage of ppoll
on high-numbered FDs.
* lib/net/protocol.rb (rbuf_fill): use IO#wait_*able
* lib/net/http/generic_request.rb (wait_for_continue): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-15 20:11:23 +00:00
normal
db2ff03bc0
lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock
...
Exceptions are noisy in debug output and waste allocations.
Use "exception: false" introduced in 2.1 to return symbols for
common errors instead.
Follow-up commits will be prepared to reduce EOFError exceptions
to further quiet debug output and IO.select may be replaced by
io/wait methods if available to reduce allocations.
[ruby-core:68787] [Feature #11044 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 21:05:29 +00:00
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