Skip to content

Commit e98650f

Browse files
Merge branch 'release/4.9.2'
2 parents 0497f0c + befcf52 commit e98650f

File tree

6 files changed

+34
-4
lines changed

6 files changed

+34
-4
lines changed

.github/workflows/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- uses: "actions/setup-python@v2"
1717
with:
1818
python-version: "3.9"
19+
- name: "Update package details"
20+
run: sudo apt --fix-missing update
1921
- name: "Install Apache package"
2022
run: sudo apt install -y apache2-dev
2123
- name: "Build mod_wsgi packages"
@@ -45,6 +47,8 @@ jobs:
4547
with:
4648
name: dist
4749
path: dist
50+
- name: "Update package details"
51+
run: sudo apt --fix-missing update
4852
- name: "Install Apache package"
4953
run: sudo apt install -y apache2-dev
5054
- name: "Update pip installation"

docs/release-notes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Release Notes
55
.. toctree::
66
:maxdepth: 2
77

8+
release-notes/version-4.9.2
89
release-notes/version-4.9.1
910
release-notes/version-4.9.0
1011

docs/release-notes/version-4.9.2.rst

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
=============
2+
Version 4.9.2
3+
=============
4+
5+
Version 4.9.2 of mod_wsgi can be obtained from:
6+
7+
https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.9.2
8+
9+
Bugs Fixed
10+
----------
11+
12+
* When using ``mod_wsgi-express`` in daemon mode, and source code reloading
13+
was enabled, an invalid URL path which contained a byte sequence which
14+
could not be decoded as UTF-8 was causing a process crash.

src/server/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ def setup_debugger(self, startup):
15201520
def setup_recorder(self, savedir):
15211521
self.application = RequestRecorder(self.application, savedir)
15221522

1523-
def reload_required(self, environ):
1523+
def reload_required(self, resource):
15241524
if self.debug_mode:
15251525
return False
15261526

@@ -1596,7 +1596,7 @@ def reload_required(self, resource):
15961596
extension = self.resource_extension(resource)
15971597
function = getattr(self.resources[extension], 'reload_required', None)
15981598
if function is not None:
1599-
return function(environ)
1599+
return function(resource)
16001600
return False
16011601

16021602
def handle_request(self, environ, start_response):

src/server/mod_wsgi.c

+11
Original file line numberDiff line numberDiff line change
@@ -3852,9 +3852,20 @@ static int wsgi_reload_required(apr_pool_t *pool, request_rec *r,
38523852
if (object) {
38533853
PyObject *args = NULL;
38543854
PyObject *result = NULL;
3855+
#if PY_MAJOR_VERSION >= 3
3856+
PyObject *path = NULL;
3857+
#endif
38553858

38563859
Py_INCREF(object);
3860+
#if PY_MAJOR_VERSION >= 3
3861+
path = PyUnicode_Decode(resource, strlen(resource),
3862+
Py_FileSystemDefaultEncoding,
3863+
"surrogateescape");
3864+
args = Py_BuildValue("(O)", path);
3865+
Py_DECREF(path);
3866+
#else
38573867
args = Py_BuildValue("(s)", resource);
3868+
#endif
38583869
result = PyObject_CallObject(object, args);
38593870
Py_DECREF(args);
38603871
Py_DECREF(object);

src/server/wsgi_version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
#define MOD_WSGI_MAJORVERSION_NUMBER 4
2727
#define MOD_WSGI_MINORVERSION_NUMBER 9
28-
#define MOD_WSGI_MICROVERSION_NUMBER 1
29-
#define MOD_WSGI_VERSION_STRING "4.9.1"
28+
#define MOD_WSGI_MICROVERSION_NUMBER 2
29+
#define MOD_WSGI_VERSION_STRING "4.9.2"
3030

3131
/* ------------------------------------------------------------------------- */
3232

0 commit comments

Comments
 (0)