cvs: php4 /main rfc1867.c

From: Date: Sat, 11 May 2002 11:58:16 +0000
Subject: cvs: php4 /main rfc1867.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11826@lists.php.net to get a copy of this message
zeev Sat May 11 07:58:16 2002 EDT Modified files: /php4/main rfc1867.c Log: 0 byte file uploads are valid, avoid choking on them Index: php4/main/rfc1867.c diff -u php4/main/rfc1867.c:1.98 php4/main/rfc1867.c:1.99 --- php4/main/rfc1867.c:1.98 Mon Apr 22 20:14:08 2002 +++ php4/main/rfc1867.c Sat May 11 07:58:16 2002 @@ -16,7 +16,7 @@ | Jani Taskinen <sniper@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.98 2002/04/23 00:14:08 sniper Exp $ */ +/* $Id: rfc1867.c,v 1.99 2002/05/11 11:58:16 zeev Exp $ */ /* * This product includes software developed by the Apache Group @@ -33,6 +33,8 @@ #include "rfc1867.h" +#undef DEBUG_FILE_UPLOAD + #define SAFE_RETURN { \ if (lbuf) efree(lbuf); \ if (abuf) efree(abuf); \ @@ -752,19 +754,19 @@ } fclose(fp); +#ifdef DEBUG_FILE_UPLOAD if(strlen(filename) > 0 && total_bytes == 0) { sapi_module.sapi_error(E_WARNING, "Uploaded file size 0 - file [%s=%s] not saved", param, filename); cancel_upload = UPLOAD_ERROR_E; } - - if (cancel_upload || total_bytes == 0) { +#endif + if (cancel_upload) { if (temp_filename) { unlink(temp_filename); efree(temp_filename); } temp_filename=""; - } else { zend_hash_add(SG(rfc1867_uploaded_files), temp_filename, strlen(temp_filename) + 1, &temp_filename, sizeof(char *), NULL); }

« previous php.cvs (#11826) next »