Changeset 605

Show
Ignore:
Timestamp:
04/03/07 16:38:55 (2 years ago)
Author:
sacha
Message:

mime content-type are case insensitive.
Ticket #91

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/hefeweizen_library_ebMS_message2.rb

    r604 r605  
    11921192        File.open(raw_message_file_path, "r").readlines.each{ | line | 
    11931193          if is_multipart == false then 
    1194             if line =~ /.*Content-Type.*multipart\/related.*/ then 
     1194            if line =~ /.*[Cc][Oo][Nn][Tt][Ee][Nn][Tt]-[Tt][Yy][Pp][Ee].*multipart\/related.*/ then 
    11951195              is_multipart = true 
    11961196            else 
     
    12041204          end 
    12051205           
    1206           if line =~ /Content-Type:(.*)/ then 
     1206          if line =~ /[Cc][Oo][Nn][Tt][Ee][Nn][Tt]-[Tt][Yy][Pp][Ee]:(.*)/ then 
    12071207            content = $1 
    12081208            entries = content.split(/;/) 
     
    12491249            end 
    12501250             
    1251             if line =~ /^Content-Id: <(.*)>/ then 
     1251            if line =~ /^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]-[Ii][Dd]: <(.*)>/ then 
    12521252              current_content_id = $1 
    1253             elsif line =~ /^Content-Disposition: attachment; filename=(.*)$/ then 
     1253            elsif line =~ /^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]-[Dd][Ii][Ss][Pp][Oo][Ss][Ii][Tt][Ii][Oo][Nn]: attachment; filename=(.*)$/ then 
    12541254              current_file_name = $1 
    12551255            end