cvs: php4 /main rfc1867.c

From: Date: Sun, 10 Mar 2002 11:03:04 +0000
Subject: cvs: php4 /main rfc1867.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9864@lists.php.net to get a copy of this message
sesser Sun Mar 10 06:03:04 2002 EDT Modified files: /php4/main rfc1867.c Log: Fix: Now returns correct Content-Type with Opera 6.01 Index: php4/main/rfc1867.c diff -u php4/main/rfc1867.c:1.94 php4/main/rfc1867.c:1.95 --- php4/main/rfc1867.c:1.94 Wed Jan 9 18:47:18 2002 +++ php4/main/rfc1867.c Sun Mar 10 06:03:04 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.95 2002/03/10 11:03:04 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);

« previous php.cvs (#9864) next »