From c7a91b98eb898f0f0a4b05046756b07474eac4bb Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Tue, 29 Dec 2009 12:10:07 +0100 Subject: [PATCH] fix for apache2 module (error catching) --- apache2/mod_uwsgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apache2/mod_uwsgi.c b/apache2/mod_uwsgi.c index 2a89d49e..47ab6f63 100644 --- a/apache2/mod_uwsgi.c +++ b/apache2/mod_uwsgi.c @@ -383,6 +383,7 @@ static int uwsgi_handler(request_rec *r) { if (uwsgi_http_status_read + cnt >= 12) { memcpy(uwsgi_http_status+uwsgi_http_status_read, buf, 12-uwsgi_http_status_read); r->status = atoi(uwsgi_http_status+8); + uwsgi_http_status_read+=cnt; } else { memcpy(uwsgi_http_status+uwsgi_http_status_read, buf, cnt); @@ -407,7 +408,7 @@ static int uwsgi_handler(request_rec *r) { close(uwsgi_poll.fd); - /* empty response return 500 */ + /* empty response returns 500 */ if (uwsgi_http_status_read == 0) { return HTTP_INTERNAL_SERVER_ERROR; }