@@ -3374,9 +3374,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
3374
3374
3375
3375
if (fld_name != NULL && fld_val != NULL ) {
3376
3376
zval val ;
3377
- /* FIXME: some locale free implementation is
3378
- * really required here,,, */
3379
- php_strtoupper (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3377
+ zend_str_tolower (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3380
3378
ZVAL_STR (& val , fld_val );
3381
3379
3382
3380
zend_hash_update (ht , fld_name , & val );
@@ -3422,11 +3420,8 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
3422
3420
}
3423
3421
if (fld_name != NULL && fld_val != NULL ) {
3424
3422
zval val ;
3425
- /* FIXME: some locale free implementation is
3426
- * really required here,,, */
3427
- php_strtoupper (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3423
+ zend_str_tolower (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3428
3424
ZVAL_STR (& val , fld_val );
3429
-
3430
3425
zend_hash_update (ht , fld_name , & val );
3431
3426
3432
3427
zend_string_release_ex (fld_name , 0 );
@@ -3512,7 +3507,7 @@ PHP_FUNCTION(mb_send_mail)
3512
3507
_php_mbstr_parse_mail_headers (& ht_headers , ZSTR_VAL (str_headers ), ZSTR_LEN (str_headers ));
3513
3508
}
3514
3509
3515
- if ((s = zend_hash_str_find (& ht_headers , "CONTENT-TYPE " , sizeof ("CONTENT-TYPE " ) - 1 ))) {
3510
+ if ((s = zend_hash_str_find (& ht_headers , "content-type " , sizeof ("content-type " ) - 1 ))) {
3516
3511
char * tmp ;
3517
3512
char * param_name ;
3518
3513
char * charset = NULL ;
@@ -3548,7 +3543,7 @@ PHP_FUNCTION(mb_send_mail)
3548
3543
suppressed_hdrs .cnt_type = 1 ;
3549
3544
}
3550
3545
3551
- if ((s = zend_hash_str_find (& ht_headers , "CONTENT-TRANSFER-ENCODING " , sizeof ("CONTENT-TRANSFER-ENCODING " ) - 1 ))) {
3546
+ if ((s = zend_hash_str_find (& ht_headers , "content-transfer-encoding " , sizeof ("content-transfer-encoding " ) - 1 ))) {
3552
3547
const mbfl_encoding * _body_enc ;
3553
3548
3554
3549
ZEND_ASSERT (Z_TYPE_P (s ) == IS_STRING );
@@ -3644,7 +3639,7 @@ PHP_FUNCTION(mb_send_mail)
3644
3639
zend_string_release_ex (str_headers , 0 );
3645
3640
}
3646
3641
3647
- if (!zend_hash_str_exists (& ht_headers , "MIME-VERSION " , sizeof ("MIME-VERSION " ) - 1 )) {
3642
+ if (!zend_hash_str_exists (& ht_headers , "mime-version " , sizeof ("mime-version " ) - 1 )) {
3648
3643
mbfl_memory_device_strncat (& device , PHP_MBSTR_MAIL_MIME_HEADER1 , sizeof (PHP_MBSTR_MAIL_MIME_HEADER1 ) - 1 );
3649
3644
mbfl_memory_device_strncat (& device , "\n" , 1 );
3650
3645
}
0 commit comments