Skip to content

Commit

Permalink
Merge branch 'release/4.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed May 31, 2022
2 parents 0497f0c + befcf52 commit e98650f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Update package details"
run: sudo apt --fix-missing update
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: "Build mod_wsgi packages"
Expand Down Expand Up @@ -45,6 +47,8 @@ jobs:
with:
name: dist
path: dist
- name: "Update package details"
run: sudo apt --fix-missing update
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: "Update pip installation"
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-4.9.2
release-notes/version-4.9.1
release-notes/version-4.9.0

Expand Down
14 changes: 14 additions & 0 deletions docs/release-notes/version-4.9.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
=============
Version 4.9.2
=============

Version 4.9.2 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.9.2

Bugs Fixed
----------

* When using ``mod_wsgi-express`` in daemon mode, and source code reloading
was enabled, an invalid URL path which contained a byte sequence which
could not be decoded as UTF-8 was causing a process crash.
4 changes: 2 additions & 2 deletions src/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ def setup_debugger(self, startup):
def setup_recorder(self, savedir):
self.application = RequestRecorder(self.application, savedir)

def reload_required(self, environ):
def reload_required(self, resource):
if self.debug_mode:
return False

Expand Down Expand Up @@ -1596,7 +1596,7 @@ def reload_required(self, resource):
extension = self.resource_extension(resource)
function = getattr(self.resources[extension], 'reload_required', None)
if function is not None:
return function(environ)
return function(resource)
return False

def handle_request(self, environ, start_response):
Expand Down
11 changes: 11 additions & 0 deletions src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3852,9 +3852,20 @@ static int wsgi_reload_required(apr_pool_t *pool, request_rec *r,
if (object) {
PyObject *args = NULL;
PyObject *result = NULL;
#if PY_MAJOR_VERSION >= 3
PyObject *path = NULL;
#endif

Py_INCREF(object);
#if PY_MAJOR_VERSION >= 3
path = PyUnicode_Decode(resource, strlen(resource),
Py_FileSystemDefaultEncoding,
"surrogateescape");
args = Py_BuildValue("(O)", path);
Py_DECREF(path);
#else
args = Py_BuildValue("(s)", resource);
#endif
result = PyObject_CallObject(object, args);
Py_DECREF(args);
Py_DECREF(object);
Expand Down
4 changes: 2 additions & 2 deletions src/server/wsgi_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 9
#define MOD_WSGI_MICROVERSION_NUMBER 1
#define MOD_WSGI_VERSION_STRING "4.9.1"
#define MOD_WSGI_MICROVERSION_NUMBER 2
#define MOD_WSGI_VERSION_STRING "4.9.2"

/* ------------------------------------------------------------------------- */

Expand Down

0 comments on commit e98650f

Please sign in to comment.