From 0015b5126235cbe24b252447845fc47d91e9d7a1 Mon Sep 17 00:00:00 2001 From: "roberto@quantal64" Date: Thu, 20 Sep 2012 17:49:30 +0200 Subject: [PATCH] fixed POST-handling reports --- plugins/python/wsgi_handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/python/wsgi_handlers.c b/plugins/python/wsgi_handlers.c index 8b9d7cf5..664c419c 100644 --- a/plugins/python/wsgi_handlers.c +++ b/plugins/python/wsgi_handlers.c @@ -152,14 +152,14 @@ static PyObject *uwsgi_Input_read(uwsgi_Input *self, PyObject *args) { if (uwsgi_waitfd(self->wsgi_req->poll.fd, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT]) <= 0) { free(tmp_buf); UWSGI_GET_GIL - return PyErr_Format(PyExc_IOError, "error waiting for wsgi.input data: Content-Length %llu received %llu", (unsigned long long) self->wsgi_req->post_cl, (unsigned long long) self->wsgi_req->post_cl - remains); + return PyErr_Format(PyExc_IOError, "error waiting for wsgi.input data: Content-Length %llu requested %llu received %llu", (unsigned long long) self->wsgi_req->post_cl, (unsigned long long) remains + tmp_pos, (unsigned long long) tmp_pos); } rlen = read(self->wsgi_req->poll.fd, tmp_buf+tmp_pos, remains); if (rlen <= 0) { free(tmp_buf); UWSGI_GET_GIL - return PyErr_Format(PyExc_IOError, "error reading wsgi.input data: Content-Length %llu received %llu", (unsigned long long) self->wsgi_req->post_cl, (unsigned long long) self->wsgi_req->post_cl - remains); + return PyErr_Format(PyExc_IOError, "error reading wsgi.input data: Content-Length %llu requested %llu received %llu", (unsigned long long) self->wsgi_req->post_cl, (unsigned long long) remains + tmp_pos, (unsigned long long) tmp_pos); } tmp_pos += rlen; remains -= rlen;