summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2022-10-05 16:58:55 +1100
committerGitHub <noreply@github.com>2022-10-05 16:58:55 +1100
commit15721162025ea35f3e7619113a772aa3d95e9f33 (patch)
tree84aefc16d02ebde55fd88dfec12d615f0df9cd48
parent0963d045d7239138ac26bcd62d71338ae9a2dc9b (diff)
downloadmod_wsgi-15721162025ea35f3e7619113a772aa3d95e9f33.tar.gz
Needs to be enabled for all Apache 2.4 versions.
-rw-r--r--src/server/mod_wsgi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c
index 121b8fb..967ac19 100644
--- a/src/server/mod_wsgi.c
+++ b/src/server/mod_wsgi.c
@@ -12916,12 +12916,21 @@ static int wsgi_hook_daemon_handler(conn_rec *c)
* is okay as the request limit body is checked in the Apache
* child process before request is proxied specifically to avoid
* unecessarily passing the content across to the daemon process.
+ * Note also that the reason that the change is applied for all
+ * Apache 2.4.X versions is because a module compiled against an
+ * Apache version before the change, can still be used with newer
+ * Apache version without being re-compiled which would result in
+ * a crash also. We can't enable for older Apache 2.X versions as
+ * ap_get_core_module_config() doesn't exist.
*/
-#if AP_MODULE_MAGIC_AT_LEAST(20110605,1)
+
+#if (AP_SERVER_MAJORVERSION_NUMBER == 2 && \
+ AP_SERVER_MINORVERSION_NUMBER >= 4)
d = (core_dir_config *)ap_get_core_module_config(r->per_dir_config);
d->limit_req_body = 0;
#endif
+
r->sent_bodyct = 0;
r->read_length = 0;