aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
Commit message (Collapse)AuthorAgeFilesLines
* * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):naruse2012-11-081-1/+9
| | | | | | treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):naruse2012-11-061-0/+11
| | | | | | don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): set default source encoding asnaruse2012-11-062-2/+2
| | | | | | | | | UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: fix Net::IMAP::ResponseParser to acceptshugo2012-10-171-0/+28
| | | | | | | | | | 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
* test_http.rb: clear environment variablesshirosaki2012-09-291-11/+15
| | | | | | | | | | * test/net/http/test_http.rb (TestNetHTTP#test_proxy_address): clear environment variables. If http_proxy environment variable was set, the test failed. * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/ssl.rb (WEBrick::Config::SSL): add new keynaruse2012-09-011-0/+1
| | | | | | | | | SSLTmpDhCallback to set SSLContext#tmp_dh_calback. * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context): follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use 0 as port like #6766 [Bug #6959]naruse2012-09-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refix r36678: switch with zlib and check content-encoding.naruse2012-08-101-6/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warnings: Net::HTTPResponse#header is obsoletenaruse2012-08-101-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Run automatic deflate decoding only if it has zlib.naruse2012-08-101-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse): localhost ↵shyouhei2012-07-261-0/+2
| | | | | | 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
* * lib/net/http.rb: Added SSL session reuse across connections for adrbrain2012-07-251-0/+23
| | | | | | | | | 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
* Use 0 for webrick's port and get the actual port. [Bug #6766]naruse2012-07-212-6/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.naruse2012-07-211-6/+27
| | | | | | | | | | | | | | | * 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
* * lib/net/http.rb: Net::HTTP now automatically detects and usesdrbrain2012-07-201-0/+161
| | | | | | | | | | | | | | | | | | | | | | 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
* * lib/net/http/response.rb: Automatically inflate gzip anddrbrain2012-07-192-2/+213
| | | | | | | | | | | | | | | | 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
* * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa2012-07-191-2/+0
| | | | | | | 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
* use localhost for both local and remote. [Bug #6746]naruse2012-07-181-12/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support IPv6 address. [Bug #6746]naruse2012-07-171-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa2012-07-121-0/+2
| | | | | | | | 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
* Use IPv4 address on connecting to 127.0.0.1.naruse2012-07-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP#connect): use local_host and local_portnaruse2012-07-111-0/+42
| | | | | | 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
* * test/net/http/test_httpresponses.rb: Add a test file forknu2012-07-051-0/+24
| | | | | | 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
* * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser ofnaruse2012-05-231-5/+22
| | | | | | | 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
* rescue EPIPE raised from conn.print because of client's timeoutnaruse2012-05-221-11/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nilnaruse2012-05-211-0/+189
| | | | | | | | 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
* Rescue exception from writing to a socket.naruse2012-05-211-1/+1
| | | | | | | | | 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
* * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.naruse2012-05-211-2/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Shutdown gracefully.naruse2012-05-201-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (decode_utf7, encode_utf7): refactored byshugo2012-05-091-2/+12
| | | | | | Nobuyoshi Nakada, to use String#encode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (body_type_attachment): parse body typeshugo2012-05-071-0/+10
| | | | | | "ATTACHMENT". [ruby-core:44849] [Bug #6397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_https.rb: update test for r35494ayumin2012-04-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip OpenSSL dependent tests if not availablenobu2012-04-231-20/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb (module Net): Added ReadTimeout to matchdrbrain2012-04-112-4/+4
| | | | | | | | | | | | | | | | | | 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
* * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.naruse2012-04-041-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.naruse2012-04-031-10/+8
| | | | | | | | | * 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
* * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should waitusa2012-04-031-0/+1
| | | | | | | | | 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
* Refix of 35206; 0.3 is too small for Ruby's timeout.naruse2012-04-011-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ReRefix the test for r35205.naruse2012-04-011-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refix the test for r35205.naruse2012-04-011-5/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix the test for r35205.naruse2012-04-011-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Client waits only the first line.naruse2012-04-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @ionaruse2012-04-011-0/+68
| | | | | | 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
* * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.shugo2012-03-311-0/+429
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse_pasv_port): refactored.shugo2012-03-261-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/ftp/test_ftp.rb: add the test, which was forgotten in theshugo2012-03-261-0/+102
| | | | | | previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (initialize): raise Net::IMAP::Error when theshugo2012-03-161-0/+19
| | | | | | | 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
* * lib/net/imap.rb (rfc822_text): ignore [] after RFC822.shugo2012-03-161-0/+16
| | | | | | [ruby-core:40945] [Bug #5620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Errordrbrain2012-02-281-1/+1
| | | | | | | | | | | * 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
* * lib/net/http.rb: Retry HTTP requests for additional network errors.drbrain2012-02-282-11/+9
| | | | | | | | | 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