rasmus Sat Sep 9 22:06:27 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/main rfc1867.c Log: Minor tweak to the file upload hooks. The MULTIPART_EVENT_FORMDATA event was only triggering when an input filter was applied. This simple change makes the event also trigger when no filter is applied. The newlength pointer is set to NULL to let a downstream module differentiate between the two cases. http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.173.2.1.2.2&r2=1.173.2.1.2.3&diff_format=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.173.2.1.2.2 php-src/main/rfc1867.c:1.173.2.1.2.3 --- php-src/main/rfc1867.c:1.173.2.1.2.2 Thu Jul 27 17:04:15 2006 +++ php-src/main/rfc1867.c Sat Sep 9 22:06:27 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.173.2.1.2.2 2006/07/27 17:04:15 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.173.2.1.2.3 2006/09/09 22:06:27 rasmus Exp $ */ /* * This product includes software developed by the Apache Group @@ -952,7 +952,17 @@ #else safe_php_register_variable(param, value, new_val_len, array_ptr, 0 TSRMLS_CC); #endif + } else if (php_rfc1867_callback != NULL) { + multipart_event_formdata event_formdata; + + event_formdata.post_bytes_processed = SG(read_post_bytes); + event_formdata.name = param; + event_formdata.value = &value; + event_formdata.length = value_len; + event_formdata.newlength = NULL; + php_rfc1867_callback(MULTIPART_EVENT_FORMDATA, &event_formdata, &event_extra_data TSRMLS_CC); } + if (!strcasecmp(param, "MAX_FILE_SIZE")) { max_file_size = atol(value); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php