pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/46458: Apache 2.4 uses TCP_NOPUSH with sendfile(2), breaking it
The following reply was made to PR pkg/46458; it has been noted by GNATS.
From: Francois Tigeot <ftigeot%wolfpond.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: ftigeot%wolfpond.org@localhost
Subject: Re: pkg/46458: Apache 2.4 uses TCP_NOPUSH with sendfile(2), breaking
it
Date: Thu, 17 May 2012 12:14:54 +0200
--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, May 17, 2012 at 10:10:01AM +0000, gnats-admin%NetBSD.org@localhost
wrote:
> Thank you very much for your problem report.
> It has the internal identification `pkg/46458'.
> The individual assigned to look at your
> report is: pkg-manager.
>
> >Category: pkg
> >Responsible: pkg-manager
> >Synopsis: Apache 2.4 uses TCP_NOPUSH with sendfile(2), breaking it
> >Arrival-Date: Thu May 17 10:10:00 +0000 2012
Same patch, attached for reference.
--
Francois Tigeot
--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-server_core_filters.c"
$NetBSD$
Remove the use of TCP_NOPUSH with sendfile(2).
This option prevents the last parts of target files to be sent until
the associated socket has been closed, making downloads seem to hang
for a few seconds.
DragonFly bug report #2368
http://bugs.dragonflybsd.org/issues/2368
--- server/core_filters.c.orig 2012-02-04 10:04:59.000000000 +0000
+++ server/core_filters.c
@@ -640,18 +640,13 @@ static apr_status_t send_brigade_nonbloc
if ((apr_file_flags_get(fd) & APR_SENDFILE_ENABLED) &&
(bucket->length >= AP_MIN_SENDFILE_BYTES)) {
if (nvec > 0) {
- (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1);
rv = writev_nonblocking(s, vec, nvec, bb, bytes_written,
c);
nvec = 0;
if (rv != APR_SUCCESS) {
- (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0);
return rv;
}
}
rv = sendfile_nonblocking(s, bucket, bytes_written, c);
- if (nvec > 0) {
- (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0);
- }
if (rv != APR_SUCCESS) {
return rv;
}
--Q68bSM7Ycu6FN28Q--
Home |
Main Index |
Thread Index |
Old Index