aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net/pop.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-14 10:41:35 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-14 10:41:35 +0000
commit6d77e51b17a29daf71c329cccdbaee1c140b101d (patch)
tree841de7537c87c43badd41b6370f18c714bc344f4 /lib/net/pop.rb
parent861e4ba6b396eadbf37208b92f1b64fad16314fd (diff)
downloadruby-6d77e51b17a29daf71c329cccdbaee1c140b101d.tar.gz
o pop.rb: accept illegal timestamp (reported by WATANABE Hirofumi)
o http.rb: when body was chunked, does not set 'Content-Length' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/pop.rb')
-rw-r--r--lib/net/pop.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index 65cd498f55..046763e0a8 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -329,11 +329,11 @@ Net::POP3
def initialize( sock )
rep = super( sock )
- /<[^@]+@[^@>]+>/o === rep.msg
- @stamp = $&
- unless @stamp then
+ m = /<.+>/.match( rep.msg )
+ unless m then
raise ProtoAuthError, "This is not APOP server: can't login"
end
+ @stamp = m[0]
end