From 3d343076eef4258bff6f6ff45f0dbabe2a28a1d4 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 10 Mar 2002 11:04:20 +0000 Subject: [PATCH] Fix: Now returns correct Content-Type for Opera 6.01 --- main/rfc1867.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main/rfc1867.c b/main/rfc1867.c index d1fcb625a6..97f7399598 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -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); -- 2.50.1