Skip to content

Commit

Permalink
Assume EnableSendFile On when unset
Browse files Browse the repository at this point in the history
This corresponds to the documented behavior of Apache2(.2).
The "emulateSendFile" code is unfortunately kind of bad, as the 8k buffers
it uses doesn't work well with regular TCP MSS of 1492.
  • Loading branch information
nmaier committed Sep 24, 2010
1 parent 0613375 commit 3ba0f30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod_xsendfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static apr_status_t ap_xsendfile_output_filter(ap_filter_t *f, apr_bucket_brigad
translated,
APR_READ | APR_BINARY
#if APR_HAS_SENDFILE
| (coreconf->enable_sendfile == ENABLE_SENDFILE_ON ? APR_SENDFILE_ENABLED : 0)
| (coreconf->enable_sendfile != ENABLE_SENDFILE_OFF ? APR_SENDFILE_ENABLED : 0)
#endif
,
0,
Expand All @@ -373,7 +373,7 @@ static apr_status_t ap_xsendfile_output_filter(ap_filter_t *f, apr_bucket_brigad
return HTTP_NOT_FOUND;
}
#if APR_HAS_SENDFILE && defined(_DEBUG)
if (coreconf->enable_sendfile != ENABLE_SENDFILE_ON) {
if (coreconf->enable_sendfile == ENABLE_SENDFILE_OFF) {
ap_log_error(
APLOG_MARK,
APLOG_WARNING,
Expand Down

0 comments on commit 3ba0f30

Please sign in to comment.