diff options
Diffstat (limited to 'mod_wsgi.c')
-rw-r--r-- | mod_wsgi.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -1,7 +1,7 @@ /* vim: set sw=4 expandtab : */ /* - * Copyright 2007-2010 GRAHAM DUMPLETON + * Copyright 2007-2011 GRAHAM DUMPLETON * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3904,6 +3904,23 @@ static int Adapter_run(AdapterObject *self, PyObject *object) Py_XDECREF(iterator); } + /* + * Log warning if more response content generated than was + * indicated, or less if there was no errors generated by + * the application. + */ + + if (self->content_length_set && ((!PyErr_Occurred() && + self->output_length != self->content_length) || + (self->output_length > self->content_length))) { + ap_log_rerror(APLOG_MARK, WSGI_LOG_DEBUG(0), self->r, + "mod_wsgi (pid=%d): Content length mismatch, " + "expected %s, response generated %s: %s", getpid(), + apr_off_t_toa(self->r->pool, self->content_length), + apr_off_t_toa(self->r->pool, self->output_length), + self->r->filename); + } + if (PyErr_Occurred()) { /* * Response content has already been sent, so cannot @@ -3944,23 +3961,6 @@ static int Adapter_run(AdapterObject *self, PyObject *object) Py_DECREF(start); Py_DECREF(vars); - /* - * Log warning if more response content generated than was - * indicated, or less if there was no errors generated by - * the application. - */ - - if (self->content_length_set && ((!PyErr_Occurred() && - self->output_length != self->content_length) || - (self->output_length > self->content_length))) { - ap_log_rerror(APLOG_MARK, WSGI_LOG_DEBUG(0), self->r, - "mod_wsgi (pid=%d): Content length mismatch, " - "expected %s, response generated %s: %s", getpid(), - apr_off_t_toa(self->r->pool, self->content_length), - apr_off_t_toa(self->r->pool, self->output_length), - self->r->filename); - } - /* Log details of any final Python exceptions. */ if (PyErr_Occurred()) |