瀏覽代碼

Fix incorrect ctype

Pascal Peridont 17 年之前
父節點
當前提交
429088bf9d
共有 1 個文件被更改,包括 4 次插入1 次删除
  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 ){
 			var t = hctype.value.split("/");
 			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") ){
 				charset = hctype.params.get("charset");