sendfileData.socket = socketRef;
sendfileData.keepAlive = keepAlive;
if (!((AprEndpoint)endpoint).getSendfile().add(sendfileData)) {
- openSocket = true;
+ if (sendfileData.socket == 0) {
+ // Didn't send all the data but the socket is no longer
+ // set. Something went wrong. Close the connection.
+ // Too late to set status code.
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString(
+ "http11processor.sendfile.error"));
+ }
+ error = true;
+ } else {
+ openSocket = true;
+ }
break;
}
}
http11processor.socket.sslreneg=Exception re-negotiating SSL connection
http11processor.socket.timeout=Error setting socket timeout
http11processor.comet.notsupported=The Comet protocol is not supported by this connector
+http11processor.sendfile.error=Error sending data using sendfile. May be caused by invalid request attributes for start/end points
iib.eof.error=Unexpected EOF read on the socket
iib.requestheadertoolarge.error=Request header is too large
data.pos, data.end - data.pos, 0);
if (nw < 0) {
if (!(-nw == Status.EAGAIN)) {
- destroySocket(data.socket);
+ Pool.destroy(data.fdpool);
+ // No need to close socket, this will be done by
+ // calling code since data.socket == 0
data.socket = 0;
return false;
} else {
is used. Fixes null thread name in access log and JMX MBean. (rjung)
</fix>
<fix>
- Protect against infinite loops in the HTTP NIO connector if sendfile is
- configured to send more data than is available in the file. (markt)
+ Protect against infinite loops (HTTP NIO) and crashes (HTTP APR) if
+ sendfile is configured to send more data than is available in the file.
+ (markt)
</fix>
<fix>
Prevent NPEs when a socket is closed in non-error conditions after