aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
Commit message (Collapse)AuthorAgeFilesLines
* * lib/net/http/header.rb (Net::HTTPHeader#{each_header,each_name,ktsj2016-05-041-0/+40
| | | | | | | | | each_capitalized_name,each_value,each_capitalized}): Return sized enumerators. * test/net/http/test_httpheader.rb: add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_httpheader.rb: add missing test ofktsj2016-05-041-0/+9
| | | | | | Net::HTTPHeader#each_capitalized_name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/imap/test_imap.rb (test_idle_timeout): Because of theodaira2016-03-071-10/+22
| | | | | | | | | timeout specified in "imap.idle(0.2)", there is no gurantee that the server thread has done all the work before the client thread performs the assertions. It depends on the thread scheduling. Add checks to avoid false positives (on AIX, particularly). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: use assert_not_*nobu2016-02-193-22/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/ftp.rb: NullSocket#closed?nobu2016-02-121-0/+8
| | | | | | | * net/ftp.rb: add NullSocket#closed? to fix closing not opened connection. [Fix GH-1232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/header.rb: Warn nil variable on HTTP Header.hsbt2016-01-291-0/+6
| | | | | | | It caused to NoMethodError. [fix GH-952][fix GH-641] Patch by @teosz * test/net/http/test_httpheader.rb: Added test for nil HTTP Header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* leakchecker.rb: remove temporary measurenobu2016-01-051-0/+1
| | | | | | | | | | | | | * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher): make watcher thread restartable. * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate): new method to terminate watcher thread. * test/lib/leakchecker.rb (LeakChecker#find_threads): revert r46941. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix common misspelling [ci skip]nobu2015-12-241-3/+3
| | | | | | | * compile.c, cont.c, doc, man: fix common misspelling. [ruby-core:72466] [Bug #11870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1614-0/+14
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix r53013; the environment defines "example" as local hostnamenaruse2015-12-091-20/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests for El Capitan failurenaruse2015-12-091-0/+11
| | | | | | http://rubyci.s3.amazonaws.com/osx1011/ruby-trunk/log/20151209T174501Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/smtp/test_response.rb: use Test::Unit. We should use Test::Unithsbt2015-12-091-2/+2
| | | | | | without rubygems and rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (connect): detect closed connection and reconnectnaruse2015-11-271-0/+17
| | | | | | | | | | | | If the server closes a keep-alive http connection, the client socket reaches EOF. To avoid an EOFError, detect the closed connection and reconnect. Added test to ensure HTTP#post succeeds even if the keep-alive-connection has been closed by the server. by Kristian Hanekamp <kris.hanekamp@gmail.com> https://github.com/ruby/ruby/pull/1089 fix GH-1089 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"hsbt2015-11-201-0/+16
| | | | | | | header. * test/net/http/test_http.rb: added test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (initialize): Connections are in passive mode pershugo2015-11-111-0/+3
| | | | | | | | | default now. The default mode can be changed by Net::FTP.default_passive=. * lib/net/ftp.rb (default_passive=, default_passive): new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".akr2015-11-102-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/pp.rb: Ditto. * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/securerandom.rb: Ditto. * lib/tmpdir.rb: Ditto. * lib/unicode_normalize/tables.rb: Ditto. * test/net/ftp/test_buffered_socket.rb: Ditto. * test/net/ftp/test_mlsx_entry.rb: Ditto. * test/open-uri/test_open-uri.rb: Ditto. * test/open-uri/test_ssl.rb: Ditto. * test/pathname/test_pathname.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. * ext/pathname/lib/pathname.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add binmode for Tempfile to prevent EOF (0x1A)naruse2015-10-271-0/+1
| | | | | | http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20151023T062322Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 0.1 second is not enough for FreeBSDnaruse2015-10-241-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: remove an empty comment line and -*-.shugo2015-10-232-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (gettextfile, getbinaryfile): use the safeshugo2015-10-231-2/+127
| | | | | | navigation operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap (idle): add a new argument timeout for keep-alive.shugo2015-10-221-0/+44
| | | | | | [ruby-core:63693] [Bug #10031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/ftp/test_ftp.rb: add tests for getbinaryfile andshugo2015-10-221-0/+159
| | | | | | gettextfile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse257): refactor.shugo2015-10-091-1/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: use frozen_string_literal: true.shugo2015-10-092-3/+9
| | | | | | | | * test/net/imap/test_imap.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb: use frozen_string_literal: true.shugo2015-10-093-3/+12
| | | | | | | | | | * test/net/ftp/test_buffered_socket.rb: ditto. * test/net/ftp/test_ftp.rb: ditto. * test/net/ftp/test_mlsx_entry.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (mtime): use usec instead of fractions to parseshugo2015-09-281-0/+11
| | | | | | | decimal fractions of a second correctly when the number of digits is not 6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (mtime): parse decimal fractions of a second asshugo2015-09-281-0/+38
| | | | | | specified in RFC 3659. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames includingshugo2015-09-141-2/+2
| | | | | | space correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (file?, directory?, appendable?, creatable?,shugo2015-09-122-1/+97
| | | | | | | deletable?, enterable?, renamable?, listable?, directory_makable?, purgeable?, readable?, writable?): new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (FACT_PARSERS): support system dependent factsshugo2015-09-121-1/+12
| | | | | | UNIX.mode, UNIX.owner, UNIX.group, UNIX.ctime, and UNIX.atime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse_mlsx_entry, mlst) raise an FTPProtoErrorshugo2015-09-121-0/+25
| | | | | | when parsing failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (mlst, mlsd): support new commands MLST and MLSDshugo2015-09-121-0/+111
| | | | | | specified in RFC 3659. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (size, mdtm, system): parse responses according toshugo2015-09-111-0/+66
| | | | | | | | RFC 959 and 3659, where reply codes must be followed by SP. * lib/net/ftp.rb (system): remove LF from the return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (getmultiline): refactor.shugo2015-09-101-0/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (list): fetch all the lines before yielding a blockshugo2015-09-081-0/+140
| | | | | | | to allow other commands in the block. [Feature #11454] Patched by Srikanth Shreenivas. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/response.rb (Net::HTTPResponse::Inflater#finish):ktsj2015-08-011-0/+53
| | | | | | | | | fix a bug that empty gzipped response body causes Zlib::BufError. [ruby-core:68846] [Bug #11058] * test/net/http/test_httpresponse.rb: tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a failure without zlibkazu2015-07-011-1/+1
| | | | | | | | * test/net/http/test_httpresponse.rb (HTTPResponseTest#test_read_body_content_encoding_deflate_uppercase): fix failure without zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/response.rb (inflater): CONTENT_ENCODING can be uppernaruse2015-06-291-0/+28
| | | | | | case. [ruby-core:69670] [Bug #11285] patched by Andy Chu git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (makeport): close the TCPServereregon2015-06-271-0/+40
| | | | | | | when sending the port fails. * test/net/ftp/test_ftp.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_raisenobu2015-06-024-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (body_ext_mpart): should work even if body-fld-dspshugo2015-05-081-0/+13
| | | | | | is omitted. [ruby-core:69093] [Bug #11128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/ftp/test_ftp.rb (create_ftp_server): set SO_OOBINLINEngoto2015-03-021-4/+5
| | | | | | | | | | for receiving OOB data which is sended with MSG_OOB flag in portable way. [Bug #10915] [ruby-dev:48885] * test/net/ftp/test_ftp.rb (test_abort, test_status): use gets for receiving OOB data in portable way. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (chdir, delete, gettextfile, mdtm, mkdir, nlst,shugo2015-02-101-0/+78
| | | | | | | 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
* * lib/net/http/header.rb: pass header names as symbols.hsbt2015-02-081-0/+8
| | | | | | | 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
* test_http.rb: test without DNS accessnobu2015-01-131-5/+8
| | | | | | | | * test/net/http/test_http.rb: get rid of accessing DNS actually for some servers returning wrong results. [ruby-core:67454] [Bug #10721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: More descriptive error message when net/http failshsbt2015-01-031-0/+9
| | | | | | | 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
* * test/net/http/test_http.rb (_test_send_request__HEAD): Addedhsbt2015-01-021-0/+11
| | | | | | failing test for send_request with HEAD method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/response.rb (Net::HTTPResponse): require one or morenaruse2014-12-231-0/+59
| | | | | | | | | 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
* test_https.rb: skip old OpenSSLnobu2014-12-131-1/+1
| | | | | | | * test/net/http/test_https.rb (TestNetHTTPS): also depends on test/openssl/utils.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_https.rbusa2014-12-091-4/+8
| | | | | | | | | | | | (TestNetHTTPS#test_certificate_verify_failure): on Windows, Errno::ECONNRESET will be raised when the verify is failure at the client side, and it'll be eaten by WEBrick. * test/open-uri/test_ssl.rb (TestOpenURISSL#test_validation_failure): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e