WinNT: Implement acceptex socket reuse. Make sure that the ap_sendfile flags

argument is properly initialized for all platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85775 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bill Stoddard
2000-07-06 15:13:30 +00:00
parent f24caae857
commit edb2fa4611
3 changed files with 35 additions and 6 deletions

View File

@ -421,6 +421,14 @@ static int sendfile_handler(request_rec *r, a_file *file, int rangestatus)
struct iovec iov;
ap_hdtr_t hdtr;
ap_hdtr_t *phdtr = &hdtr;
ap_int32_t flags = 0;
if (!r->connection->keepalive) {
/* Prepare the socket to be reused. Ignored on systems
* that do not support reusing the accept socket
*/
flags |= APR_SENDFILE_DISCONNECT_SOCKET;
}
/*
* We want to send any data held in the client buffer on the
@ -446,7 +454,7 @@ static int sendfile_handler(request_rec *r, a_file *file, int rangestatus)
phdtr,
&offset,
&length,
0);
flags);
}
else {
while (ap_each_byterange(r, &offset, &length)) {
@ -455,7 +463,7 @@ static int sendfile_handler(request_rec *r, a_file *file, int rangestatus)
phdtr,
&offset,
&length,
0);
flags);
phdtr = NULL;
}
}