summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2001-02-21 20:25:53 +0000
committerSascha Schumann <sas@php.net>2001-02-21 20:25:53 +0000
commit4a32816f9e4383b968c39b2a6f6a7922b768059a (patch)
tree7b71cf13a5379d16be4e6d91284550b401da78aa
parent5ed1199b61096ca32ca64fc4021f5bf6c5ff7a50 (diff)
downloadphp-git-4a32816f9e4383b968c39b2a6f6a7922b768059a.tar.gz
If we cannot send the header, we don't need to continue with the page.
-rw-r--r--sapi/thttpd/thttpd.c3
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)