* lib/net/pop.rb: revert to rev1.63. 1.64 wrongly contains POPS code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
111b11703d
commit
277839dc81
@ -196,21 +196,11 @@ module Net
|
|||||||
# Class Parameters
|
# Class Parameters
|
||||||
#
|
#
|
||||||
|
|
||||||
# The default port for POP3 connections, port 110.
|
# The default port for POP3 connections, port 110
|
||||||
def POP3.default_port
|
def POP3.default_port
|
||||||
pop3_default_port()
|
|
||||||
end
|
|
||||||
|
|
||||||
# The default port for POP3 connections, port 110.
|
|
||||||
def POP3.pop3_default_port
|
|
||||||
110
|
110
|
||||||
end
|
end
|
||||||
|
|
||||||
# The default port for POP3s connections, port 995.
|
|
||||||
def POP3.pop3s_default_port
|
|
||||||
995
|
|
||||||
end
|
|
||||||
|
|
||||||
def POP3.socket_type #:nodoc: obsolete
|
def POP3.socket_type #:nodoc: obsolete
|
||||||
Net::InternetMessageIO
|
Net::InternetMessageIO
|
||||||
end
|
end
|
||||||
@ -355,8 +345,6 @@ module Net
|
|||||||
@mails = nil
|
@mails = nil
|
||||||
@n_mails = nil
|
@n_mails = nil
|
||||||
@n_bytes = nil
|
@n_bytes = nil
|
||||||
|
|
||||||
@use_ssl = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Does this instance use APOP authentication?
|
# Does this instance use APOP authentication?
|
||||||
@ -414,12 +402,6 @@ module Net
|
|||||||
|
|
||||||
alias active? started? #:nodoc: obsolete
|
alias active? started? #:nodoc: obsolete
|
||||||
|
|
||||||
# Sets wheather we use SSL or not.
|
|
||||||
# You MUST require 'net/pops' before setting use_ssl=true.
|
|
||||||
def use_ssl?
|
|
||||||
false # redefined in net/pops
|
|
||||||
end
|
|
||||||
|
|
||||||
# Starts a POP3 session.
|
# Starts a POP3 session.
|
||||||
#
|
#
|
||||||
# When called with block, gives a POP3 object to the block and
|
# When called with block, gives a POP3 object to the block and
|
||||||
@ -443,11 +425,9 @@ module Net
|
|||||||
end
|
end
|
||||||
|
|
||||||
def do_start( account, password )
|
def do_start( account, password )
|
||||||
s = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
|
@socket = InternetMessageIO.new(timeout(@open_timeout) {
|
||||||
if use_ssl?
|
TCPSocket.open(@address, @port)
|
||||||
s = OpenSSL::SSL::SSLSocket.open(s, @ssl_context)
|
})
|
||||||
end
|
|
||||||
@socket = InternetMessageIO.new(s)
|
|
||||||
logging "POP session started: #{@address}:#{@port} (#{@apop ? 'APOP' : 'POP'})"
|
logging "POP session started: #{@address}:#{@port} (#{@apop ? 'APOP' : 'POP'})"
|
||||||
@socket.read_timeout = @read_timeout
|
@socket.read_timeout = @read_timeout
|
||||||
@socket.debug_output = @debug_output
|
@socket.debug_output = @debug_output
|
||||||
@ -768,8 +748,8 @@ module Net
|
|||||||
|
|
||||||
def auth( account, password )
|
def auth( account, password )
|
||||||
check_response_auth(critical {
|
check_response_auth(critical {
|
||||||
check_response_auth(get_response('USER %s', account))
|
check_response_auth(get_response('USER ' + account))
|
||||||
get_response('PASS %s', password)
|
get_response('PASS ' + password)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user