Tcl Library Source Code

Check-in [074ec6a961]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix issue [a16b1095974e071d], error in mime.tcl
Timelines: family | ancestors | descendants | both | pooryorick
Files: files | file ages | folders
SHA3-256: 074ec6a961081540581ef2e80e141e979b0343b3f1d330c79415443f6cd64a9f
User & Date: pooryorick 2018-08-14 19:16:51
References
2019-06-19
23:46 Ticket [57909d2e1c] Error opening MIMEs with CRLF line ends in Linux status still Closed with 3 other changes artifact: 6ea4bc84e0 user: aku
2018-08-14
19:41 Closed ticket [a16b109597]: Error in mime.tcl plus 7 other changes artifact: 58f00f90c2 user: pooryorick
Context
2021-04-30
14:08
Merge fix for [a16b1095974e071d]. check-in: cb6b4de78f user: pooryorick tags: trunk
2018-08-14
19:39
convert mime.test to utf-8 check-in: 6c21e9dfe4 user: pooryorick tags: pooryorick
19:16
Fix issue [a16b1095974e071d], error in mime.tcl check-in: 074ec6a961 user: pooryorick tags: pooryorick
2018-07-22
11:38
Add a package for trigonometric functions that use angles in degrees and additional trigonometric and hyperbolic functions, including their inverses. check-in: 7538200f88 user: arjenmarkus tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/mime/mime.tcl.

667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
            incr state(lines.current)
            set x [string length $line]
            if {$x == 0} {set blankP 1}
        }

        }

         if {(!$blankP) && ([string last \r $line] == {$x - 1})} {
             set line [string range $line 0 [expr {$x - 2}]]
             if {$x == 1} {
                 set blankP 1
             }
         }

        if {(!$blankP) && (([







|







667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
            incr state(lines.current)
            set x [string length $line]
            if {$x == 0} {set blankP 1}
        }

        }

         if {(!$blankP) && [string match *\r $line]} {
             set line [string range $line 0 [expr {$x - 2}]]
             if {$x == 1} {
                 set blankP 1
             }
         }

        if {(!$blankP) && (([

Changes to modules/mime/mime.test.

598
599
600
601
602
603
604
















605
606
607
608
609
T3JpZ2luYWwtUmVjaXBpZW50OiA8L2ZheD1ibHViYkBndW1taS5ib290PgpBY3Rpb246IGZhaWxl
ZApEaWFnbm9zdGljLUNvZGU6IHNtdHA7IDU1MCAjNS4xLjAgQWRkcmVzcyByZWplY3RlZC4KUmVt
b3RlLU1UQTogNTMuMjQuMjgyLjE1MA==
}]
    set parts [mime::getproperty $token parts]
    mime::getheader [lindex $parts end] Remote-MTA
} 53.24.282.150

















# -------------------------------------------------------------------------

testsuiteCleanup
return







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
T3JpZ2luYWwtUmVjaXBpZW50OiA8L2ZheD1ibHViYkBndW1taS5ib290PgpBY3Rpb246IGZhaWxl
ZApEaWFnbm9zdGljLUNvZGU6IHNtdHA7IDU1MCAjNS4xLjAgQWRkcmVzcyByZWplY3RlZC4KUmVt
b3RlLU1UQTogNTMuMjQuMjgyLjE1MA==
}]
    set parts [mime::getproperty $token parts]
    mime::getheader [lindex $parts end] Remote-MTA
} 53.24.282.150

# -------------------------------------------------------------------------


test mime-13.0 {
	issue a16b1095974e071d
} {
    set msg "MIME-Version: 1.0
Content-Type: text/plain\r
\r
so plain
"

    set tok [mime::initialize -string $msg]
	mime::getbody $tok
} "so plain\n"

# -------------------------------------------------------------------------

testsuiteCleanup
return