summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-04-27 19:08:53 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:35 -0400
commitddfcc89714a01ec93c8a268cddfa6a13ed69679c (patch)
treec571830e2102520195b836cca705ca80f307f884
parent2f472ddccccccf2424706f740e8dbbb72fdd78ce (diff)
downloadlighttpd-git-ddfcc89714a01ec93c8a268cddfa6a13ed69679c.tar.gz
[mod_cgi] do not issue trace if CGI closes input
It is not necessarily an error for CGI to close its input early
-rw-r--r--src/mod_cgi.c8
1 files changed, 8 insertions, 0 deletions
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: