Re: cvs: php4(PHP_4_2_0) /main rfc1867.c
| From: | derick@php.net | Date: | Sun, 10 Mar 2002 22:14:59 +0000 |
| Subject: | Re: cvs: php4(PHP_4_2_0) /main rfc1867.c | ||
| References: | 1 | Groups: | php.cvs php.qa |
| Request: | Send a blank email to php-cvs+get-9873@lists.php.net to get a copy of this message | ||
On Sun, 10 Mar 2002, Stefan Esser wrote:
> 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
Please discuss things before you merge to the branch.
regards,
Derick
>
>
>
> 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);
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
----------------------------------------------------------------------
PHP: Scripting the Web - derick@php.net
All your branches are belong to me!
SRM: Site Resource Manager - www.vl-srm.net
-----------------------------------------------------------------------