From: Sascha Schumann Date: Wed, 21 Feb 2001 20:25:53 +0000 (+0000) Subject: If we cannot send the header, we don't need to continue with the page. X-Git-Tag: php-4.0.5RC1~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a32816f9e4383b968c39b2a6f6a7922b768059a;p=php If we cannot send the header, we don't need to continue with the page. --- 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)