@@ -3370,9 +3370,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
3370
3370
3371
3371
if (fld_name != NULL && fld_val != NULL ) {
3372
3372
zval val ;
3373
- /* FIXME: some locale free implementation is
3374
- * really required here,,, */
3375
- php_strtoupper (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3373
+ zend_str_tolower (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3376
3374
ZVAL_STR (& val , fld_val );
3377
3375
3378
3376
zend_hash_update (ht , fld_name , & val );
@@ -3418,11 +3416,8 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
3418
3416
}
3419
3417
if (fld_name != NULL && fld_val != NULL ) {
3420
3418
zval val ;
3421
- /* FIXME: some locale free implementation is
3422
- * really required here,,, */
3423
- php_strtoupper (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3419
+ zend_str_tolower (ZSTR_VAL (fld_name ), ZSTR_LEN (fld_name ));
3424
3420
ZVAL_STR (& val , fld_val );
3425
-
3426
3421
zend_hash_update (ht , fld_name , & val );
3427
3422
3428
3423
zend_string_release_ex (fld_name , 0 );
@@ -3508,7 +3503,7 @@ PHP_FUNCTION(mb_send_mail)
3508
3503
_php_mbstr_parse_mail_headers (& ht_headers , ZSTR_VAL (str_headers ), ZSTR_LEN (str_headers ));
3509
3504
}
3510
3505
3511
- if ((s = zend_hash_str_find (& ht_headers , "CONTENT-TYPE " , sizeof ("CONTENT-TYPE " ) - 1 ))) {
3506
+ if ((s = zend_hash_str_find (& ht_headers , "content-type " , sizeof ("content-type " ) - 1 ))) {
3512
3507
char * tmp ;
3513
3508
char * param_name ;
3514
3509
char * charset = NULL ;
@@ -3544,7 +3539,7 @@ PHP_FUNCTION(mb_send_mail)
3544
3539
suppressed_hdrs .cnt_type = 1 ;
3545
3540
}
3546
3541
3547
- if ((s = zend_hash_str_find (& ht_headers , "CONTENT-TRANSFER-ENCODING " , sizeof ("CONTENT-TRANSFER-ENCODING " ) - 1 ))) {
3542
+ if ((s = zend_hash_str_find (& ht_headers , "content-transfer-encoding " , sizeof ("content-transfer-encoding " ) - 1 ))) {
3548
3543
const mbfl_encoding * _body_enc ;
3549
3544
3550
3545
ZEND_ASSERT (Z_TYPE_P (s ) == IS_STRING );
@@ -3640,7 +3635,7 @@ PHP_FUNCTION(mb_send_mail)
3640
3635
zend_string_release_ex (str_headers , 0 );
3641
3636
}
3642
3637
3643
- if (!zend_hash_str_exists (& ht_headers , "MIME-VERSION " , sizeof ("MIME-VERSION " ) - 1 )) {
3638
+ if (!zend_hash_str_exists (& ht_headers , "mime-version " , sizeof ("mime-version " ) - 1 )) {
3644
3639
mbfl_memory_device_strncat (& device , PHP_MBSTR_MAIL_MIME_HEADER1 , sizeof (PHP_MBSTR_MAIL_MIME_HEADER1 ) - 1 );
3645
3640
mbfl_memory_device_strncat (& device , "\n" , 1 );
3646
3641
}
0 commit comments