Fix: Now returns correct Content-Type with Opera 6.01

This commit is contained in:
Stefan Esser 2002-03-10 11:03:04 +00:00
parent bbe42d7673
commit 2872bce78a

View file

@ -807,12 +807,18 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
} else { } else {
register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC);
} }
s = "";
efree(filename); efree(filename);
s = NULL;
/* Possible Content-Type: */ /* Possible Content-Type: */
if (!(cd = php_mime_get_hdr_value(header, "Content-Type")) || filename == "") { if (!(cd = php_mime_get_hdr_value(header, "Content-Type")) || filename == "") {
cd = ""; cd = "";
} else {
/* fix for Opera 6.01 */
s = strchr(cd, ';');
if (s != NULL) {
*s = '\0';
}
} }
/* Add $foo_type */ /* 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); register_http_post_files_variable(lbuf, cd, http_post_files, 0 TSRMLS_CC);
/* Restore Content-Type Header */
if (s != NULL) {
*s = ';';
}
s = "";
/* Initialize variables */ /* Initialize variables */
add_protected_variable(param TSRMLS_CC); add_protected_variable(param TSRMLS_CC);