// Initialize fd from data given
try {
data.fdpool = Socket.pool(data.socket);
+ } catch (Exception e) {
+ // Pool not created so no need to destroy it.
+ log.error(sm.getString("endpoint.sendfile.error"), e);
+ data.socket = 0;
+ return false;
+ }
+ try {
data.fd = File.open
(data.fileName, File.APR_FOPEN_READ
| File.APR_FOPEN_SENDFILE_ENABLED | File.APR_FOPEN_BINARY,
}
} catch (Exception e) {
log.error(sm.getString("endpoint.sendfile.error"), e);
+ Pool.destroy(data.fdpool);
+ data.socket = 0;
return false;
}
// Add socket to the list. Newly added sockets will wait
<bug>51557</bug>: Ignore HTTP headers that do not comply with RFC 2616
and use header names that are not tokens. (markt)
</fix>
+ <add>
+ Improve error handling for HTTP APR if an error occurs while using
+ sendfile. (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Jasper">