cvs: php-src /sapi/apache2handler sapi_apache2.c
| From: | Ilia Alshanetsky | Date: | Wed, 13 Dec 2006 00:41:45 +0000 |
| Subject: | cvs: php-src /sapi/apache2handler sapi_apache2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42092@lists.php.net to get a copy of this message | ||
iliaa Wed Dec 13 00:41:45 2006 UTC
Modified files:
/php-src/sapi/apache2handler sapi_apache2.c
Log:
MFB: Fixed bug #39201 (Possible crash in Apache 2 with 413 ErrorHandler).
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.78&r2=1.79&diff_format=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.78
php-src/sapi/apache2handler/sapi_apache2.c:1.79
--- php-src/sapi/apache2handler/sapi_apache2.c:1.78 Tue Dec 12 18:05:38 2006
+++ php-src/sapi/apache2handler/sapi_apache2.c Wed Dec 13 00:41:45 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.78 2006/12/12 18:05:38 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.79 2006/12/13 00:41:45 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -582,8 +582,13 @@
}
}
- /* check if comming due to ErrorDocument */
- if (parent_req && parent_req->status != HTTP_OK && strcmp(r->protocol,
"INCLUDED")) {
+ /*
+ * check if comming due to ErrorDocument
+ * We make a special exception of 413 (Invalid POST request) as the invalidity of the request
occurs
+ * during processing of the request by PHP during POST processing. Therefor we need to re-use the
exiting
+ * PHP instance to handle the request rather then creating a new one.
+ */
+ if (parent_req && parent_req->status != HTTP_OK && parent_req->status !=
413 && strcmp(r->protocol, "INCLUDED")) {
parent_req = NULL;
goto normal;
}