Browse Source

core: parser - allow more chars in mime type

(cherry picked from commit 5bb4eb4d6546e2d0a2d911b09797172a0a2a2b83)
Camille Oudot 8 năm trước cách đây
mục cha
commit
bf86b73c97
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/core/parser/parse_content.c

+ 3 - 1
src/core/parser/parse_content.c

@@ -38,7 +38,9 @@
 
 
 
 
 #define is_mime_char(_c_) \
 #define is_mime_char(_c_) \
-	(isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
+	(isalnum((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_' \
+			|| (_c_)=='!' || (_c_)=='%' || (_c_)=='*' \
+			|| (_c_)=='\'' || (_c_)=='`' || (_c_)=='~')
 #define is_char_equal(_c_,_cs_) \
 #define is_char_equal(_c_,_cs_) \
 	( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
 	( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )