diff options
-rw-r--r-- | sapi/thttpd/thttpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 1fe3f6d1ca..11510ff00c 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -98,7 +98,8 @@ static void sapi_thttpd_send_header(sapi_header_struct *sapi_header, void *serve vec[n++].iov_len = 2; TG(hc)->bytes += 2; - writev(TG(hc)->conn_fd, vec, n); + if (writev(TG(hc)->conn_fd, vec, n) == -1 && errno == EPIPE) + php_handle_aborted_connection(); } static int sapi_thttpd_read_post(char *buffer, uint count_bytes SLS_DC) |