summaryrefslogtreecommitdiff
path: root/test/net
AgeCommit message (Collapse)Author
2012-09-01Use 0 as port like #6766 [Bug #6959]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Refix r36678: switch with zlib and check content-encoding.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Suppress warnings: Net::HTTPResponse#header is obsoletenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Run automatic deflate decoding only if it has zlib.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-26* test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse): localhost ↵shyouhei
is not (always) 127.0.0.1. Don't expect that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25* lib/net/http.rb: Added SSL session reuse across connections for adrbrain
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-21Use 0 for webrick's port and get the actual port. [Bug #6766]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21* lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.naruse
* 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-20* lib/net/http.rb: Net::HTTP now automatically detects and usesdrbrain
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-19* lib/net/http/response.rb: Automatically inflate gzip anddrbrain
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* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa
re-enable the tests because now it's OK on windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18use localhost for both local and remote. [Bug #6746]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17Support IPv6 address. [Bug #6746]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa
cannot cross between network interfaces on Windows, so skip this test until we find better test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12Use IPv4 address on connecting to 127.0.0.1.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11* lib/net/http.rb (Net::HTTP#connect): use local_host and local_portnaruse
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-05* test/net/http/test_httpresponses.rb: Add a test file forknu
Net::HTTPResponses and put a test case for the previous bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23* lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser ofnaruse
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-22rescue EPIPE raised from conn.print because of client's timeoutnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nilnaruse
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-21Rescue exception from writing to a socket.naruse
conn.print may raise EPIPE because ftp.retrbinary closes the connection because of read_timeout. but the exact result varies from the situation like platform, timing, and so on. it may raise ECONNRESET, ECONNABORTED, EOFError, or nothing raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20Shutdown gracefully.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09* lib/net/imap.rb (decode_utf7, encode_utf7): refactored byshugo
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-07* lib/net/imap.rb (body_type_attachment): parse body typeshugo
"ATTACHMENT". [ruby-core:44849] [Bug #6397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30* test/net/http/test_https.rb: update test for r35494ayumin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23skip OpenSSL dependent tests if not availablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11* lib/net/protocol.rb (module Net): Added ReadTimeout to matchdrbrain
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-04* lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03* lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.naruse
* 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* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should waitusa
a little before closing socket because if the client call Net::FTP#getmultiline the socket is suddenly closed by the server in the getline loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01Refix of 35206; 0.3 is too small for Ruby's timeout.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01ReRefix the test for r35205.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01Refix the test for r35205.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01Fix the test for r35205.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01Client waits only the first line.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01* lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @ionaruse
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-03-31* lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* lib/net/ftp.rb (parse_pasv_port): refactored.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* test/net/ftp/test_ftp.rb: add the test, which was forgotten in theshugo
previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16* lib/net/imap.rb (initialize): raise Net::IMAP::Error when theshugo
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* lib/net/imap.rb (rfc822_text): ignore [] after RFC822.shugo
[ruby-core:40945] [Bug #5620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28 * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Errordrbrain
* 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 * lib/net/http.rb: Retry HTTP requests for additional network errors.drbrain
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-25Fix r34779. Raised error on connection reset varies on environments.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24* lib/net/http.rb (Net::HTTP#transport_request): Fix infinite loopdrbrain
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-02* test/net/http/test_https_proxy.rbkazu
(HTTPSProxyTest#test_https_proxy_authentication): add workaround to avoid to hang up without openssl. see #5786 * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02* test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debugusa
output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-20* lib/net/http.rb (Net::HTTP#transport_request): retry a idempotentnaruse
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
2011-12-22Suppress warnings.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e