sendfile bucket and then lose it's socket, and fix a comment.
Submitted by: Ryan Morgan <rmorgan@covalent.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93524
13f79535-47bb-0310-9956-
ffa450edef68
* APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into
* mutiple buckets, no greater than MAX(apr_size_t), and more granular
* than that in case the brigade code/filters attempt to read it directly.
- * ### 4mb is an invention, no idea if it is reasonable.
+ * ### 16mb is an invention, no idea if it is reasonable.
*/
-#define AP_MAX_SENDFILE 16777216
+#define AP_MAX_SENDFILE 16777216 /* 2^24 */
/**
* Special Apache error codes. These are basically used
hdtr.trailers = vec_trailers;
}
#if APR_HAS_SENDFILE
- if (!c->keepalive) {
+ if (!c->keepalive && APR_BUCKET_IS_EOS(last_e)) {
/* Prepare the socket to be reused */
flags |= APR_SENDFILE_DISCONNECT_SOCKET;
}