cvs: php4(PHP_4_2_0) /main rfc1867.c
| From: | Stefan Esser | Date: | Sun, 10 Mar 2002 11:04:20 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /main rfc1867.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9865@lists.php.net to get a copy of this message | ||
sesser Sun Mar 10 06:04:20 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/main rfc1867.c
Log:
Fix: Now returns correct Content-Type for Opera 6.01
Index: php4/main/rfc1867.c
diff -u php4/main/rfc1867.c:1.94 php4/main/rfc1867.c:1.94.2.1
--- php4/main/rfc1867.c:1.94 Wed Jan 9 18:47:18 2002
+++ php4/main/rfc1867.c Sun Mar 10 06:04:20 2002
@@ -16,7 +16,7 @@
| Jani Taskinen <sniper@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.94 2002/01/09 23:47:18 jimw Exp $ */
+/* $Id: rfc1867.c,v 1.94.2.1 2002/03/10 11:04:20 sesser Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -807,12 +807,18 @@
} 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 */
@@ -830,6 +836,12 @@
sprintf(lbuf, "%s[type]", param);
}
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);