mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix: Now returns correct Content-Type with Opera 6.01
This commit is contained in:
parent
bbe42d7673
commit
2872bce78a
1 changed files with 13 additions and 1 deletions
|
@ -807,12 +807,18 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
|
|||
} else {
|
||||
register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC);
|
||||
}
|
||||
s = "";
|
||||
efree(filename);
|
||||
s = NULL;
|
||||
|
||||
/* Possible Content-Type: */
|
||||
if (!(cd = php_mime_get_hdr_value(header, "Content-Type")) || filename == "") {
|
||||
cd = "";
|
||||
} else {
|
||||
/* fix for Opera 6.01 */
|
||||
s = strchr(cd, ';');
|
||||
if (s != NULL) {
|
||||
*s = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Add $foo_type */
|
||||
|
@ -831,6 +837,12 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
|
|||
}
|
||||
register_http_post_files_variable(lbuf, cd, http_post_files, 0 TSRMLS_CC);
|
||||
|
||||
/* Restore Content-Type Header */
|
||||
if (s != NULL) {
|
||||
*s = ';';
|
||||
}
|
||||
s = "";
|
||||
|
||||
/* Initialize variables */
|
||||
add_protected_variable(param TSRMLS_CC);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue