From ddfcc89714a01ec93c8a268cddfa6a13ed69679c Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 27 Apr 2023 19:08:53 -0400 Subject: [mod_cgi] do not issue trace if CGI closes input It is not necessarily an error for CGI to close its input early --- src/mod_cgi.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mod_cgi.c b/src/mod_cgi.c index 9f05bf87..2f534249 100644 --- a/src/mod_cgi.c +++ b/src/mod_cgi.c @@ -730,15 +730,23 @@ static int cgi_write_request(handler_ctx *hctx, int fd) { else if (wr < 0) { switch(errno) { case EAGAIN: + #ifdef EWOULDBLOCK + #if EAGAIN != EWOULDBLOCK + case EWOULDBLOCK: + #endif + #endif case EINTR: /* ignore and try again later */ break; case EPIPE: case ECONNRESET: /* connection closed */ + #if 0 /*(not necessarily an error for CGI to close input)*/ log_error(r->conf.errh, __FILE__, __LINE__, "failed to send post data to cgi, connection closed by CGI"); + #endif /* skip all remaining data */ + /*(this may repeat if streaming and more data is received)*/ chunkqueue_mark_written(cq, chunkqueue_length(cq)); break; default: -- cgit v1.2.1