Skip to content

Commit

Permalink
Merge branch 'release/4.5.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Mar 13, 2017
2 parents 94767f9 + fb5c04c commit 3bdb340
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
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.5.15
release-notes/version-4.5.14
release-notes/version-4.5.13
release-notes/version-4.5.12
Expand Down
15 changes: 15 additions & 0 deletions docs/release-notes/version-4.5.15.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
==============
Version 4.5.15
==============

Version 4.5.15 of mod_wsgi can be obtained from:

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

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

* Incorrect version for mod_wsgi was being reported in server token.

* On 32 bit platforms, when reading from request content, all input would
be returned and the chunk size would be ignored.
22 changes: 20 additions & 2 deletions src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,11 @@ static apr_int64_t Input_read_from_input(InputObject *self, char *buffer,

static PyObject *Input_read(InputObject *self, PyObject *args)
{
apr_off_t size = -1;
#if defined(HAVE_LONG_LONG)
PY_LONG_LONG size = -1;
#else
long size = -1;
#endif

PyObject *result = NULL;
char *buffer = NULL;
Expand All @@ -1249,8 +1253,13 @@ static PyObject *Input_read(InputObject *self, PyObject *args)
return NULL;
}

#if defined(HAVE_LONG_LONG)
if (!PyArg_ParseTuple(args, "|L:read", &size))
return NULL;
#else
if (!PyArg_ParseTuple(args, "|l:read", &size))
return NULL;
#endif

#if defined(MOD_WSGI_WITH_DAEMONS)
if (wsgi_idle_timeout && !self->ignore_activity) {
Expand Down Expand Up @@ -1512,7 +1521,11 @@ static PyObject *Input_read(InputObject *self, PyObject *args)

static PyObject *Input_readline(InputObject *self, PyObject *args)
{
apr_off_t size = -1;
#if defined(HAVE_LONG_LONG)
PY_LONG_LONG size = -1;
#else
long size = -1;
#endif

PyObject *result = NULL;
char *buffer = NULL;
Expand All @@ -1525,8 +1538,13 @@ static PyObject *Input_readline(InputObject *self, PyObject *args)
return NULL;
}

#if defined(HAVE_LONG_LONG)
if (!PyArg_ParseTuple(args, "|L:readline", &size))
return NULL;
#else
if (!PyArg_ParseTuple(args, "|l:readline", &size))
return NULL;
#endif

if (self->seen_error) {
PyErr_SetString(PyExc_IOError, "Apache/mod_wsgi request data read "
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 5
#define MOD_WSGI_MICROVERSION_NUMBER 13
#define MOD_WSGI_VERSION_STRING "4.5.14"
#define MOD_WSGI_MICROVERSION_NUMBER 15
#define MOD_WSGI_VERSION_STRING "4.5.15"

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

Expand Down

0 comments on commit 3bdb340

Please sign in to comment.