/[pupa]/bugcomm/lib/bugcomm/service.rb
ViewVC logotype

Diff of /bugcomm/lib/bugcomm/service.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by okuji, Fri Oct 11 00:49:06 2002 UTC revision 1.14 by okuji, Fri Oct 11 06:36:33 2002 UTC
# Line 531  module BugCommunicator Line 531  module BugCommunicator
531              file.header['Content-Type'] = content_type + '; charset=US-ASCII'              file.header['Content-Type'] = content_type + '; charset=US-ASCII'
532              file.header['Content-Transfer-Encoding'] = '7bit'              file.header['Content-Transfer-Encoding'] = '7bit'
533            else            else
534              file.body = lf_to_crlf(contents).to_a.pack('M*')              file.body = [lf_to_crlf(contents)].pack('M*')
535              file.header['Content-Type'] = content_type + '; charset=UTF-8'              file.header['Content-Type'] = content_type + '; charset=UTF-8'
536              file.header['Content-Transfer-Encoding'] = 'quoted-printable'              file.header['Content-Transfer-Encoding'] = 'quoted-printable'
537            end            end
538          else          else
539            file.body = lf_to_crlf(contents).to_a.pack('m*')            file.body = [contents].pack('m*')
540            file.header['Content-Type'] = content_type            file.header['Content-Type'] = content_type
541            file.header['Content-Transfer-Encoding'] = 'base64'            file.header['Content-Transfer-Encoding'] = 'base64'
542          end          end
# Line 605  module BugCommunicator Line 605  module BugCommunicator
605          raise MalformedRequestError, "invalid address `#{address}'"          raise MalformedRequestError, "invalid address `#{address}'"
606        end        end
607                
608        admins = admins.split(/\s*,\s*/)        tmp = admins.split(/\s*,\s*/)
609        if admins.empty?        if tmp.empty?
610          raise MalformedRequestError, "invalid admins `#{tmp}'"          raise MalformedRequestError, "invalid admins `#{tmp}'"
611        end        end
612        admins.each do |a|        tmp.each do |a|
613          if RMail::Address.new(a).address.nil?          if RMail::Address.new(a).address.nil?
614            raise MalformedRequestError, "invalid admin address `#{a}'"            raise MalformedRequestError, "invalid admin address `#{a}'"
615          end          end
616        end        end
617          admins = tmp
618                
619        lists = lists.split(/\s*,\s*/)        tmp = lists.split(/\s*,\s*/)
620        if lists.empty?        if tmp.empty?
621          raise MalformedRequestError, "invalid lists `#{tmp}'"          raise MalformedRequestError, "invalid lists `#{tmp}'"
622        end        end
623        lists.each do |l|        tmp.each do |l|
624          if RMail::Address.new(l).address.nil?          if RMail::Address.new(l).address.nil?
625            raise MalformedRequestError, "invalid list address `#{l}'"            raise MalformedRequestError, "invalid list address `#{l}'"
626          end          end
627        end        end
628          lists = tmp
629    
630        cid = nil        cid = nil
631        action = nil        action = nil
# Line 817  module BugCommunicator Line 819  module BugCommunicator
819                                      description,                                      description,
820                                      nil,                                      nil,
821                                      attachment.read)                                      attachment.read)
822            debug("attachment = `#{attachment.inspect}'")
823        end        end
824                
825        mod = Module.new        mod = Module.new

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26