1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb: call on_connect() on re-opening socket.
* lib/net/pop.rb: also POP3 can use APOP auth.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2001-02-06 12:26:25 +00:00
parent cdc7602379
commit 5113e8923c
3 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Tue Feb 6 21:30:44 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/net/http.rb: call on_connect() on re-opening socket.
* lib/net/pop.rb: also POP3 can use APOP auth.
Tue Feb 6 20:19:10 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/net/http.rb: add HTTP#request.

View file

@ -425,6 +425,7 @@ module Net
req['connection'] = 'close'
elsif @socket.closed? then
@socket.reopen
on_connect
end
if @seems_1_0_server then
req['connection'] = 'close'

View file

@ -21,7 +21,7 @@ Net::Protocol
=== Class Methods
: new( address = 'localhost', port = 110 )
: new( address = 'localhost', port = 110, apop = false )
creates a new Net::POP3 object.
This method does not open TCP connection yet.
@ -184,6 +184,7 @@ module Net
protocol_param :port, '110'
protocol_param :command_type, '::Net::NetPrivate::POP3Command'
protocol_param :apop_command_type, '::Net::NetPrivate::APOPCommand'
protocol_param :mail_type, '::Net::POPMail'
@ -206,9 +207,10 @@ module Net
end
def initialize( addr = nil, port = nil )
super
def initialize( addr = nil, port = nil, apop = false )
super addr, port
@mails = nil
@apop = false
end
attr :mails
@ -238,6 +240,11 @@ module Net
private
def conn_command( sock )
@command =
(@apop ? type.apop_command_type : type.command_type).new(sock)
end
def do_start( acnt, pwd )
@command.auth( acnt, pwd )