Browse Source

Fix incorrect ctype

Pascal Peridont 17 years ago
parent
commit
429088bf9d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      std/mtwin/mail/Part.hx

+ 4 - 1
std/mtwin/mail/Part.hx

@@ -361,7 +361,10 @@ class MetaPart<T> {
 		if( hctype != null ){
 		if( hctype != null ){
 			var t = hctype.value.split("/");
 			var t = hctype.value.split("/");
 			ctype0 = StringTools.trim(t[0]).toLowerCase();
 			ctype0 = StringTools.trim(t[0]).toLowerCase();
-			ctype1 = StringTools.trim(t[1]).toLowerCase();
+			if( t.length > 1 )
+				ctype1 = StringTools.trim(t[1]).toLowerCase();
+			else
+				ctype1 = "";
 
 
 			if( hctype.params.exists("charset") ){
 			if( hctype.params.exists("charset") ){
 				charset = hctype.params.get("charset");
 				charset = hctype.params.get("charset");