Commit 62c835a6 authored by Wilfredo Sanchez's avatar Wilfredo Sanchez
Browse files

Commits 160348 and 160352 are obviated by commit 178340 in APR. httpd

should have to deal with EAGAIN on a socket it doesn't know is
non-blocking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178341 13f79535-47bb-0310-9956-ffa450edef68
parent 201fc3d0
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -522,8 +522,7 @@ static apr_status_t emulate_sendfile(core_net_rec *c, apr_file_t *fd,
        sendlen = togo > sizeof(buffer) ? sizeof(buffer) : togo;
        o = 0;
        rv = apr_file_read(fd, buffer, &sendlen);
        if (rv == APR_SUCCESS && sendlen) {
            while ((rv == APR_SUCCESS || APR_STATUS_IS_EAGAIN(rv)) && sendlen) {
        while (rv == APR_SUCCESS && sendlen) {
            bytes_sent = sendlen;
            rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
            *nbytes += bytes_sent;
@@ -534,7 +533,6 @@ static apr_status_t emulate_sendfile(core_net_rec *c, apr_file_t *fd,
            }
        }
    }
    }

    /* Send the trailers
     * XXX: optimization... if it will fit, send this on the last send in the