diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-12-13 00:41:33 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-12-13 00:41:33 +0000 |
| commit | 1c4806c515b365e39485a48f366ac9ecb7caa77c (patch) | |
| tree | 654c63b4403edee3caa47fc5af6f4db8c63f5c40 /sapi/apache2handler/sapi_apache2.c | |
| parent | db87e11e6b1ecb4a50224788c251be2c17ef940a (diff) | |
| download | php-git-1c4806c515b365e39485a48f366ac9ecb7caa77c.tar.gz | |
Fixed bug #39201 (Possible crash in Apache 2 with 413 ErrorHandler).
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
| -rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 87b1861531..a9deab7854 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -587,8 +587,13 @@ zend_first_try { } } - /* 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; } |
