aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
Commit message (Collapse)AuthorAgeFilesLines
* * lib/net/http.rb (Net::HTTP#connect): support SNI (Server Nameakr2011-02-071-0/+2
| | | | | | | | Indication) for HTTPS. [ruby-dev:43164] http://stackoverflow.com/questions/4685736/openssl-server-name-indication-support-in-ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: use bytesize for binary strings.naruse2011-01-141-2/+2
| | | | | | patched by Yoshimasa Niwa. [ruby-core:34222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP#connect): makes it timeout duringyugui2011-01-121-14/+20
| | | | | | | | | | | | | SSL handshake too. [ruby-core:34203] Patch by Marc Slemko. * test/net/http/test_http.rb (TestNetHTTP_v1_2#test_timeout_during_HTTP_session): test for [ruby-core:34203] * test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb (eof?): BufferedIO should proxy eof? to thetenderlove2011-01-061-0/+4
| | | | | | underlying IO object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP#get): A header hash given should notknu2011-01-051-1/+3
| | | | | | be modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adding more tests for Net::SMTP::Response classtenderlove2010-12-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* passing nil to split is not necessarytenderlove2010-12-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: refactoring Net::SMTP#esmtp= to use antenderlove2010-12-221-9/+3
| | | | | | attr_accessor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: Net::SMTP should close the SSL connection if thetenderlove2010-12-221-2/+14
| | | | | | connection verification fails. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPRequest#send_request_body_data):naruse2010-12-141-0/+1
| | | | | | set binmode to tempfile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPRequest#set_form): Added to supportnaruse2010-12-132-1/+138
| | | | | | | | both application/x-www-form-urlencoded and multipart/form-data. There is a similar API, Net::HTTPRequest#set_form_data, but to keep its compatibility this is newly added. [ruby-dev:42729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add doc to warn the userinfo for auth. [ruby-core:33255]naruse2010-12-101-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: remove version 1.1 features.naruse2010-12-101-92/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (xlist): supported the XLIST command, which is anshugo2010-12-071-1/+33
| | | | | | | extension by Apple and Google. patch by Geoff Youngs. [ruby-core:33521] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP#set_form_data):naruse2010-12-021-11/+3
| | | | | | use URI.encode_www_form for application/x-www-form-urlencoded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix positional wording in lib/net/http.rb to match revised orderdrbrain2010-12-011-11/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve rdoc of net/http/http.rb.naruse2010-12-011-24/+22
| | | | | | | | * use URI(..) * normalize Net::HTTP.start() * use Net::HTTP.start(hostname, :use_ssl). Feature #2579 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: improve rdoc.naruse2010-12-012-323/+289
| | | | | | | | This change the order of chapter because such overview should begin with simple examples. patched by Eric Hodel [ruby-core:33469] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: improve rdoc.naruse2010-11-301-10/+65
| | | | | | patched by Eric Hodel ref #4100 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: improve rdoc.naruse2010-11-301-142/+273
| | | | | | patched by mathew murphy [ruby-core:33472] ref #4100 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: improve rdoc.naruse2010-11-271-66/+60
| | | | | | patched by Mike Perham [ruby-core:33433] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/*.rb: Remove unused variable warnings.marcandre2010-11-083-3/+2
| | | | | | Patch by Run Paint [ruby-core:30991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/telnet.rb (Net::Telnet#close): added.naruse2010-10-211-0/+4
| | | | | | patched by Erik Hollensbe [ruby-dev:42260] #3830 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (transport_request): @socket may be nil.naruse2010-10-181-1/+1
| | | | | | patched by Egbert Eich [ruby-core:32829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (HTTP.get): specify ASCII-8BIT as the resultnaruse2010-10-111-1/+1
| | | | | | | encoding of Zlib::GzipReader. http://hibari.2ch.net/test/read.cgi/tech/1281473294/271 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic#hostname): new method.akr2010-10-061-5/+5
| | | | | | | | | | | | | | (URI::Generic#hostname=): ditto. * lib/open-uri.rb: use URI#hostname * lib/net/http.rb: ditto. [ruby-core:32056] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: load io/console.nobu2010-07-301-3/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (example): use IO#noecho to read password ifnobu2010-07-301-5/+5
| | | | | | possible, and defer until needed. [ruby-dev:41889] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (example): support starttls option.nobu2010-07-301-6/+10
| | | | | | [ruby-dev:41888] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: adding support to rfc5789 patch verb.naruse2010-06-011-10/+32
| | | | | | | | | | | | | | Added a Net::HTTP::Patch class which expects a message body and response body. It recycles the post method into a patch one, that will send the encoded representation to the server. Summarizing, a new class has been created, the post method extracted into send_entity, including a new argument, which defines which class to use (Post or Patch) and finally a patch method was created. [ruby-core:30426] Patched by Guilherme Silveira <guilherme.silveira AT caelum.com.br> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (disconnect): closes the socket of a Net::IMAPshugo2010-05-191-1/+5
| | | | | | object only when it is not closed. [ruby-dev:41350] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (disconnect): terminates @receiver_thread even ifshugo2010-05-081-1/+7
| | | | | | @sock.shutdown raises an exception. [ruby-dev:34881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPResponse#read_chunked): ensure to skip themame2010-05-031-2/+6
| | | | | | | | | | last newline of chunk. [ruby-core:29229] * test/net/http/utils.rb: add an option for chunked response test. * test/net/http/test_http.rb: add tests for chunked response. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP#rcptto_list): fixed typo.nobu2010-04-271-1/+1
| | | | | | | [ruby-core:29809] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (fetch_internal): do not quote message data itemshugo2010-04-251-1/+7
| | | | | | names. Thanks, Eric Hodel. [ruby-core:23508] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP#rcptto_list): continue when at leastnobu2010-04-161-5/+17
| | | | | | | | one RCPT is accepted. based on a patch from Kero van Gelder at [ruby-core:26190]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap (encode_utf7): encode & properly. Thanks, Kengoshugo2010-04-141-1/+1
| | | | | | Matsuyama. [ruby-dev:38063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].nobu2010-03-202-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (initialize): set @sock to a NullSocket instance toshugo2010-02-061-2/+10
| | | | | | raise FTPConnectionError when not connected. [ruby-dev:40258] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (receive_responses): does not hang when an unexpected BYEshugo2010-02-061-2/+3
| | | | | | response received. fixed [ruby-core:27944]. Thanks, Bob Potter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}):nobu2010-01-181-2/+2
| | | | | | | use inclusive range same as the header representation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add call-seq for Net::HTTP.start.naruse2010-01-181-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP.start): options may not be given.nobu2010-01-121-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP#start): add hash argument tonaruse2010-01-121-3/+33
| | | | | | | set ssl related options. when use_ssl is set default value of verify_mode is OpenSSL::SSL::VERIFY_PEER. [ruby-dev:40003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http, lib/net/https: move content from net/https tonaruse2010-01-082-46/+29
| | | | | | net/http. [ruby-dev:39986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb (putbinaryfile): use APPE for resume.shugo2009-11-191-2/+6
| | | | | | Thanks, Tomoyuki Chikanaga. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (flag_list): untaint strings to intern in the safeshugo2009-11-191-1/+33
| | | | | | | | level 1. * lib/net/imap.rb (max_flag_count=): new methods to set the max number of flags interned to symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/telnet.rb: don't use simple delegate.xibbar2009-11-121-3/+1
| | | | | | because SimpleDelegate behavior changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPResponse#each_response_header):nahi2009-10-311-1/+1
| | | | | | | cosmetic: '?\ ' -> '?\s' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTPResponse#each_response_header):nahi2009-10-301-3/+10
| | | | | | | | | | accept multiline message header of HTTP response. see #1796. cf. RFC 2616 '4.2 Message Header'. * test/net/http/test_httpresponse.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e