aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
Commit message (Collapse)AuthorAgeFilesLines
* Update URL of Japanese document of net/popkazu2016-09-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/header.rb: Fix typo. [ci skip][fix GH-1407]hsbt2016-08-161-1/+1
| | | | | | * transcode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/generic_rquest.rb (write_header): A Request-Line mustshugo2016-07-061-1/+6
| | | | | | not contain CR or LF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (putline): raise an ArgumentError whenshugo2016-07-051-0/+3
| | | | | | CR or LF is included in a line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Cache no proxy casenobu2016-06-281-1/+3
| | | | | | | * lib/net/http.rb (Net::HTTP#proxy_uri): cache the case no proxy is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use conditional operatornobu2016-06-281-5/+1
| | | | | | | * lib/net/http.rb (Net::HTTP#proxy): use conditional operator to get rid of confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove dead link [ci skip]nobu2016-06-111-3/+0
| | | | | | | * lib/net/smtp.rb: [DOC] Remove dead link on documentation for Japanese of SMTP. [Fix GH-1380] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (getok, get_response): raise an ArgumentError whenshugo2016-06-081-0/+9
| | | | | | | CR or LF is included in a line, because they are not allowed in RFC5321. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/header.rb: [DOC] add documentation thatktsj2016-05-041-0/+10
| | | | | | | Net::HTTPHeader#{each_header,each_name,each_capitalized_name, each_value,each_capitalized} without block returns an enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/header.rb (Net::HTTPHeader#{each_header,each_name,ktsj2016-05-041-5/+5
| | | | | | | | | 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
* net/http/header.rb: refactornobu2016-04-251-12/+8
| | | | | | | | | * lib/net/http/header.rb (connection_close?): match headers without making intermediate arrays. * lib/net/http/header.rb (connection_keep_alive?): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: Improve documentation for SSL requests via GET method.hsbt2016-04-221-4/+9
| | | | | | [fix GH-1325][ci skip] Patch by @jsyeo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/ftp.rb: NullSocket#closed?nobu2016-02-121-0/+4
| | | | | | | * 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-2/+5
| | | | | | | 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
* stdlib: avoid extra calls to eliminate "\n" from Base64normal2016-01-104-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | We may use the '0' (zero) to avoid adding the line feed. Furthermore, the '*' (asterisk) modifier is not needed for a single-element arrays. * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String): eliminate chomp * lib/net/http.rb (connect): eliminate delete * lib/net/http/header.rb (basic_encode): ditto * lib/net/imap.rb (authenticate): eliminate gsub (self.encode_utf7): shorten delete arg * lib/net/smtp.rb (base64_encode): eliminate gsub * lib/open-uri.rb (OpenURI.open_http): eliminate delete * lib/rss/rss.rb: ditto * lib/securerandom.rb (base64): ditto (urlsafe_base64): eliminate delete! * lib/webrick/httpauth/digestauth.rb (split_param_value): eliminate chop * lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete (setup_upstream_proxy_authentication): ditto [ruby-core:72666] [Feature #11938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/responses.rb: Added new response class for 451 status code.hsbt2015-12-302-0/+4
| | | | | | * lib/net/http.rb: documentation for HTTPUnavailableForLegalReasons git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Fix typosa_matsuda2015-12-233-3/+3
| | | | | | | | | | | | | | | | | * benchmark.rb * getoptlong.rb * irb.rb * net/http.rb * net/http/header.rb * net/imap.rb * optparse.rb * pstore.rb * webrick.rb * xmlrpc.rb [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/http.rb (open_timeout): update default value in RDoc [ci skip]normal2015-12-211-1/+1
| | | | | | [ruby-core:72413] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53226 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
* * ext/socket/lib/socket.rb: use safe navigation operator.hsbt2015-12-142-3/+3
| | | | | | | | | | | [fix GH-1142] Patch by @mlarraz * lib/drb/extservm.rb: ditto. * lib/net/http.rb: ditto. * lib/net/http/response.rb: ditto. * lib/scanf.rb: ditto. * lib/uri/generic.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup! * lib/net/http.rb (connect): detect closed connection and reconnect ↵naruse2015-11-271-1/+1
| | | | | | 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@52766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (connect): detect closed connection and reconnectnaruse2015-11-271-4/+10
| | | | | | | | | | | | 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-3/+3
| | | | | | | 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/http.rb: set hostname before call ossl_ssl_set_session.hsbt2015-11-201-2/+2
| | | | | | [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (initialize): Connections are in passive mode pershugo2015-11-111-2/+15
| | | | | | | | | 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/net/http.rb (Net::HTTP#initialize):naruse2015-11-071-1/+1
| | | | | | default value of Net::HTTP#open_timeout is now 60 (was nil). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* change DOTQnobu2015-11-061-9/+9
| | | | | | | * defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: remove an empty comment line and -*-.shugo2015-10-231-2/+1
| | | | 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-13/+15
| | | | | | 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-2/+12
| | | | | | [ruby-core:63693] [Bug #10031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse257): refactor.shugo2015-10-091-18/+1
| | | | 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-091-3/+5
| | | | | | | | * 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-091-4/+6
| | | | | | | | | | * 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-2/+1
| | | | | | | 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-13/+10
| | | | | | specified in RFC 3659. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: removed unused variable. It's removed at r13648.hsbt2015-09-251-2/+0
| | | | | | [fix GH-1022] Patch by @nkondratyev git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames includingshugo2015-09-141-1/+1
| | | | | | space correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (size, modify, create, type, unique, perm, lang,shugo2015-09-131-0/+8
| | | | | | media_type, charset): new methods to return standard facts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2015-09-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (file?, directory?, appendable?, creatable?,shugo2015-09-121-1/+107
| | | | | | | 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-2/+8
| | | | | | 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-1/+8
| | | | | | when parsing failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (TIME_PARSER): use "Z" instead of "00:00" toshugo2015-09-121-2/+1
| | | | | | get UTC time. Thanks, Wilson Bilkovich. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2015-09-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (mlst, mlsd): support new commands MLST and MLSDshugo2015-09-121-0/+74
| | | | | | 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-23/+28
| | | | | | | | 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-8/+8
| | | | 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-7/+6
| | | | | | | 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/+1
| | | | | | | | | 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
* * lib/net/http/response.rb (Net::HTTPResponse#inflater):ktsj2015-08-011-3/+3
| | | | | | | fix TypeError. An exception object might be nil. [ruby-core:68846] [Bug #11058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e