*** mime.tcl Wed Aug 6 23:24:04 1997 --- mime.tcl.new Wed Aug 6 23:22:52 1997 *************** *** 286,294 **** if [regexp {([^=]+)=(.+)} $sub match key val] { set key [string trim [string tolower $key]] set val [string trim $val] ! if [regexp {"([^"]+)"} $val x val2] { ! # Trim quotes and any extra crap after close quote ! set val $val2 } lappend mimeHdr($part,params) $key set mimeHdr($part,param,$key) $val --- 286,297 ---- if [regexp {([^=]+)=(.+)} $sub match key val] { set key [string trim [string tolower $key]] set val [string trim $val] ! # Allow single as well as double quotes ! if [regexp {^["']} $val quote] { ! if [regexp ^${quote}(\[^$quote\]+)$quote $val x val2] { ! # Trim quotes and any extra crap after close quote ! set val $val2 ! } } lappend mimeHdr($part,params) $key set mimeHdr($part,param,$key) $val *************** *** 1679,1685 **** lappend mimeHdr($part=$subpart,hdrs) $cur } } elseif [regexp -indices {^[ ]+} $line match] { ! if ![info exists cur] { # No header! puts $tmpFile $line break --- 1682,1688 ---- lappend mimeHdr($part=$subpart,hdrs) $cur } } elseif [regexp -indices {^[ ]+} $line match] { ! if {![info exists cur] || [regexp {^[ ]+$} $line]} { # No header! puts $tmpFile $line break *************** *** 1727,1733 **** # Skip any blank lines or "ugly uucp-style From_ lines" at the frontend. while {([set numBytes [gets $fileIO line]] == 0) || ! [regexp {^>?From } $line]} {} # Read and parse headers # Display in-line if on the fastpath (first part) --- 1730,1736 ---- # Skip any blank lines or "ugly uucp-style From_ lines" at the frontend. while {([set numBytes [gets $fileIO line]] == 0) || ! [regexp {^(>?From )|([ ]+$)} $line]} {} # Read and parse headers # Display in-line if on the fastpath (first part)