diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2014-08-07 12:43:23 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2014-08-07 12:43:23 +0000 |
commit | ce700fae4d79d4b62b9f0d7859ac5d5e2ef02041 (patch) | |
tree | c11192fad0863f665c40f07207bfb887d998a917 /usr.sbin | |
parent | b5f14e09da793d6c0f65e0be30678325028dd272 (diff) |
Don't try to ouput FCGI_STDERR into error.log if there is no data.
Problem noticed by naddy@, OK reyk@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/httpd/server_fcgi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/httpd/server_fcgi.c b/usr.sbin/httpd/server_fcgi.c index 7533cd5b9b0..6850dd0a30f 100644 --- a/usr.sbin/httpd/server_fcgi.c +++ b/usr.sbin/httpd/server_fcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_fcgi.c,v 1.28 2014/08/07 10:52:34 florian Exp $ */ +/* $OpenBSD: server_fcgi.c,v 1.29 2014/08/07 12:43:22 florian Exp $ */ /* * Copyright (c) 2014 Florian Obser <florian@openbsd.org> @@ -478,7 +478,8 @@ server_fcgi_read(struct bufferevent *bev, void *arg) /* fallthrough if content_len == 0 */ case FCGI_READ_CONTENT: - if (clt->clt_fcgi_type == FCGI_STDERR && len) { + if (clt->clt_fcgi_type == FCGI_STDERR && + EVBUFFER_LENGTH(clt->clt_srvevb) > 0) { if ((ptr = get_string( EVBUFFER_DATA(clt->clt_srvevb), EVBUFFER_LENGTH(clt->clt_srvevb))) |