diff --git a/AUTHORS b/AUTHORS index 8c663bc4..38b76a29 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,6 +29,7 @@ Piotr Grzybowski Gerrit Telkamp Erik Slagter Andreas Wehrmann +Eivind Sarto Documentation contributions also came from: Marco Maggi diff --git a/ChangeLog b/ChangeLog index c9275bc6..f914a7a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Fri Mar 11 22:25:29 CET 2011 + Fixing bug in MHD_create_response_from_fd_at_offset with non-zero offsets. -ES + Sat Mar 5 22:00:36 CET 2011 Do not use POLLRDHUP, which causes build errors on OS X / OpenSolaris (#1667). -CG diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index efa8b018..23836168 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -746,7 +746,7 @@ send_param_adapter (struct MHD_Connection *connection, { /* can use sendfile */ offset = (off_t) connection->response_write_position + connection->response->fd_off; - left = connection->response->total_size - offset; + left = connection->response->total_size - connection->response_write_position; if (left > SSIZE_MAX) left = SSIZE_MAX; /* cap at return value limit */ ret = sendfile (connection->socket_fd,