commit db4a45630df49f0fd6270a16dad3552cdef8ee43
parent 3bd6769cff82ce752d45de3084667a4bcc72fea1
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Wed, 26 Mar 2008 09:38:41 -0700
Merge branch 'master' into next
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
@@ -41,8 +41,8 @@ module MBox
/^(X-Original-To):\s*(.*)$/i,
/^(Envelope-To):\s*(.*)$/i: header[last = $1] ||= $2
- when /^$/: break
- when /^\S+: /: last = nil # some other header we don't care about
+ when /^\r*$/: break
+ when /^\S+:/: last = nil # some other header we don't care about
else
header[last] += " " + line.chomp.gsub(/^\s+/, "") if last
end
@@ -65,6 +65,7 @@ module MBox
header
end
+ ## never actually called
def read_body f
body = []
f.each_line do |l|
diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
@@ -85,7 +85,7 @@ class Loader < Source
ret = ""
@mutex.synchronize do
@f.seek offset
- until @f.eof? || (l = @f.gets) =~ /^$/
+ until @f.eof? || (l = @f.gets) =~ /^\r*$/
ret += l
end
end