diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-10 23:31:32 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-10 23:31:32 +0000 |
commit | 85f2a05a6810026111d2ba56ca77a7d485b0caac (patch) | |
tree | df66349e1e6600e186d3615818a5e1f4ba4a2c85 /lib/net/protocol.rb | |
parent | c317efff86a1ebc4bbd61e05c854fc1d5bfb2efe (diff) | |
download | ruby-85f2a05a6810026111d2ba56ca77a7d485b0caac.tar.gz ruby-85f2a05a6810026111d2ba56ca77a7d485b0caac.tar.xz ruby-85f2a05a6810026111d2ba56ca77a7d485b0caac.zip |
aamine
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.31
* lib/net/http.rb: initializes header in HTTP, not HTTPCommand
* lib/net/protocol.rb, http.rb: rewrites proxy code
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index e070d29d9..82cc82fa2 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -1,6 +1,6 @@ =begin -= net/protocol.rb version 1.1.30 += net/protocol.rb version 1.1.31 written by Minero Aoki <aamine@dp.u-netsurf.ne.jp> @@ -31,10 +31,6 @@ Object This method creates a new Protocol object and opens a session. equals to Net::Protocol.new( address, port ).start( *protoargs ) -: Proxy( address, port ) - This method creates a proxy class of its protocol. - Arguments are address/port of proxy host. - === Methods : address @@ -69,7 +65,7 @@ module Net class Protocol - Version = '1.1.30' + Version = '1.1.31' class << self @@ -85,38 +81,6 @@ module Net end end - def Proxy( p_addr, p_port = nil ) - p_port ||= self.port - klass = Class.new( self ) - klass.module_eval %- - - def initialize( addr, port ) - @proxyaddr = '#{p_addr}' - @proxyport = '#{p_port}' - super @proxyaddr, @proxyport - @address = addr - @port = port - end - - def connect( addr = nil, port = nil ) - super @proxyaddr, @proxyport - end - private :connect - - attr_reader :proxyaddr, :proxyport - - - def klass.proxy? - true - end - - klass - end - - def proxy? - false - end - - private def protocol_param( name, val ) @@ -225,7 +189,6 @@ module Net - class Response def initialize( ctype, cno, msg ) |