diff --git a/NEWS b/NEWS index 1027340d..5e5fe9a9 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ NEWS * case insensitive match for secdownload md5 token (#1710) * Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687) * fixed mod_secdownload problem with unsigned time_t (#1688) + * handle EAGAIN and EINTR for freebsd sendfile (#1675) - 1.4.19 - 2008-03-10 diff --git a/src/network_freebsd_sendfile.c b/src/network_freebsd_sendfile.c index 61508343..a54a4754 100644 --- a/src/network_freebsd_sendfile.c +++ b/src/network_freebsd_sendfile.c @@ -166,6 +166,7 @@ int network_write_chunkqueue_freebsdsendfile(server *srv, connection *con, int f if (-1 == sendfile(c->file.fd, fd, offset, toSend, NULL, &r, 0)) { switch(errno) { case EAGAIN: + case EINTR: break; case ENOTCONN: return -2; @@ -175,7 +176,7 @@ int network_write_chunkqueue_freebsdsendfile(server *srv, connection *con, int f } } - if (r == 0) { + if (r == 0 && (errno != EAGAIN && errno != EINTR)) { int oerrno = errno; /* We got an event to write but we wrote nothing *