]> granicus.if.org Git - php/commitdiff
If we cannot send the header, we don't need to continue with the page.
authorSascha Schumann <sas@php.net>
Wed, 21 Feb 2001 20:25:53 +0000 (20:25 +0000)
committerSascha Schumann <sas@php.net>
Wed, 21 Feb 2001 20:25:53 +0000 (20:25 +0000)
sapi/thttpd/thttpd.c

index 1fe3f6d1ca59391dc3d13e7c9abec7bf966b7d7b..11510ff00ce37a3c3aadb79ec9301cd11edd09d9 100644 (file)
@@ -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)