1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2000-11-10 23:31:32 +00:00
parent ae5cb89708
commit f5ba5e64d5
5 changed files with 194 additions and 108 deletions

View file

@ -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 )