diff options
-rw-r--r-- | docs/release-notes.rst | 1 | ||||
-rw-r--r-- | docs/release-notes/version-4.9.4.rst | 21 | ||||
-rw-r--r-- | src/server/mod_wsgi.c | 21 | ||||
-rw-r--r-- | src/server/wsgi_apache.c | 13 | ||||
-rw-r--r-- | src/server/wsgi_apache.h | 5 | ||||
-rwxr-xr-x | src/server/wsgi_version.h | 4 |
6 files changed, 63 insertions, 2 deletions
diff --git a/docs/release-notes.rst b/docs/release-notes.rst index ad6d55c..524296d 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,6 +5,7 @@ Release Notes .. toctree:: :maxdepth: 2 + release-notes/version-4.9.4 release-notes/version-4.9.3 release-notes/version-4.9.2 release-notes/version-4.9.1 diff --git a/docs/release-notes/version-4.9.4.rst b/docs/release-notes/version-4.9.4.rst new file mode 100644 index 0000000..d6f1b5e --- /dev/null +++ b/docs/release-notes/version-4.9.4.rst @@ -0,0 +1,21 @@ +============= +Version 4.9.4 +============= + +Version 4.9.4 of mod_wsgi can be obtained from: + + https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.9.4 + +Bugs Fixed +---------- + +* Apache 2.4.54 changed the default value for ``LimitRequestBody`` from 0, which + indicates there is no limit, to 1Gi. If the Apache configuration supplied with + a distribution wasn't explicitly setting ``LimitRequestBody`` to 0 at global + server scope for the purposes of documenting the default, and it was actually + relying on the compiled in default, then when using mod_wsgi daemon mode, if a + request body size greater than 1Gi was encountered the mod_wsgi daemon mode + process would crash. + +* Fix ability to build mod_wsgi against Apache 2.2. Do note that in general only + recent versions of Apache 2.4 are supported diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c index a4b49df..3f5d855 100644 --- a/src/server/mod_wsgi.c +++ b/src/server/mod_wsgi.c @@ -12597,6 +12597,9 @@ static apr_status_t wsgi_header_filter(ap_filter_t *f, apr_bucket_brigade *b) /* Output status line. */ + if (!r->status_line) + r->status_line = ap_get_status_line(r->status); + vec1[0].iov_base = (void *)"Status:"; vec1[0].iov_len = strlen("Status:"); vec1[1].iov_base = (void *)" "; @@ -12710,6 +12713,7 @@ static int wsgi_hook_daemon_handler(conn_rec *c) apr_bucket_brigade *bb; core_request_config *req_cfg; + core_dir_config *d; ap_filter_t *current = NULL; ap_filter_t *next = NULL; @@ -12901,6 +12905,23 @@ static int wsgi_hook_daemon_handler(conn_rec *c) r->per_dir_config = r->server->lookup_defaults; + /* + * Try and ensure that request body limit in daemon mode process + * is unlimited as Apache 2.4.54 changed rules for limit and if + * unset is now overridden by HTTP filters to be 1GiB rather than + * unlimited. This is required since we populate configuration + * from the base server config only so setting unlimited in a more + * specific context such as a virtual host wouldn't be visible. + * Note that setting this to unlimited in the daemon mode process + * 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. + */ + + d = (core_dir_config *)ap_get_core_module_config(r->per_dir_config); + + d->limit_req_body = 0; + r->sent_bodyct = 0; r->read_length = 0; diff --git a/src/server/wsgi_apache.c b/src/server/wsgi_apache.c index 955ed41..375642d 100644 --- a/src/server/wsgi_apache.c +++ b/src/server/wsgi_apache.c @@ -52,6 +52,19 @@ void wsgi_ap_close_listeners(void) /* ------------------------------------------------------------------------- */ +#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1) + +apr_status_t wsgi_ap_pool_cleanup_set_null(void *data_) +{ + void **ptr = (void **)data_; + *ptr = NULL; + return APR_SUCCESS; +} + +#endif + +/* ------------------------------------------------------------------------- */ + #if (APR_MAJOR_VERSION == 0) && \ (APR_MINOR_VERSION == 9) && \ (APR_PATCH_VERSION < 5) diff --git a/src/server/wsgi_apache.h b/src/server/wsgi_apache.h index 4b518f4..e6e7356 100644 --- a/src/server/wsgi_apache.h +++ b/src/server/wsgi_apache.h @@ -128,6 +128,11 @@ extern void wsgi_ap_close_listeners(void); #define ap_close_listeners wsgi_ap_close_listeners #endif +#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1) +extern apr_status_t wsgi_ap_pool_cleanup_set_null(void *); +#define ap_pool_cleanup_set_null wsgi_ap_pool_cleanup_set_null +#endif + #if (APR_MAJOR_VERSION == 0) && \ (APR_MINOR_VERSION == 9) && \ (APR_PATCH_VERSION < 5) diff --git a/src/server/wsgi_version.h b/src/server/wsgi_version.h index bdba3d9..912bc46 100755 --- a/src/server/wsgi_version.h +++ b/src/server/wsgi_version.h @@ -25,8 +25,8 @@ #define MOD_WSGI_MAJORVERSION_NUMBER 4 #define MOD_WSGI_MINORVERSION_NUMBER 9 -#define MOD_WSGI_MICROVERSION_NUMBER 3 -#define MOD_WSGI_VERSION_STRING "4.9.3" +#define MOD_WSGI_MICROVERSION_NUMBER 4 +#define MOD_WSGI_VERSION_STRING "4.9.4.dev1" /* ------------------------------------------------------------------------- */ |