You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Allan Edwards <ak...@us.ibm.com> on 2003/01/10 20:09:15 UTC
core.c not handling APR_ENOTIMPL from apr_sendfile
Without this I believe Win98/ME are broken
on HEAD and APACHE_2_0_BRANCH. OK to commit?
Allan
Index: core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/core.c,v
retrieving revision 1.225.2.1
diff -u -d -b -r1.225.2.1 core.c
--- core.c 9 Jan 2003 16:27:25 -0000 1.225.2.1
+++ core.c 10 Jan 2003 17:46:16 -0000
@@ -3972,6 +3972,11 @@
sent */
flags); /* apr_sendfile flags */
+ if (APR_ENOTIMPL == rv) {
+ rv = emulate_sendfile(net, fd, &hdtr, foffset, flen,
+ &bytes_sent);
+ }
+
if (logio_add_bytes_out && bytes_sent > 0)
logio_add_bytes_out(c, bytes_sent);
}
Re: core.c not handling APR_ENOTIMPL from apr_sendfile
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Allen,
The test above the block of code... (apr _file_flags_get(fd) & APR_SENDFILE_ENABLED) should be false... If you look at
the code in Win32's apr_file_open() you will notice the case
ELSE_WIN_OS_IS_ANSI causes us to reset the ENABLED bit.
I'm much more concerned why that flag isn't reset on Win32
than hacking in the quick-fix below.
Bill
At 01:09 PM 1/10/2003, you wrote:
>Without this I believe Win98/ME are broken
>on HEAD and APACHE_2_0_BRANCH. OK to commit?
>
>Allan
>
>Index: core.c
>===================================================================
>RCS file: /home/cvs/httpd-2.0/server/core.c,v
>retrieving revision 1.225.2.1
>diff -u -d -b -r1.225.2.1 core.c
>--- core.c 9 Jan 2003 16:27:25 -0000 1.225.2.1
>+++ core.c 10 Jan 2003 17:46:16 -0000
>@@ -3972,6 +3972,11 @@
> sent */
> flags); /* apr_sendfile flags */
>
>+ if (APR_ENOTIMPL == rv) {
>+ rv = emulate_sendfile(net, fd, &hdtr, foffset, flen,
>+ &bytes_sent);
>+ }
>+
> if (logio_add_bytes_out && bytes_sent > 0)
> logio_add_bytes_out(c, bytes_sent);
> }
>
>
>
>
>
>Index: core.c
>===================================================================
>RCS file: /home/cvs/httpd-2.0/server/core.c,v
>retrieving revision 1.225.2.1
>diff -u -d -b -r1.225.2.1 core.c
>--- core.c 9 Jan 2003 16:27:25 -0000 1.225.2.1
>+++ core.c 10 Jan 2003 17:46:16 -0000
>@@ -3972,6 +3972,11 @@
> sent */
> flags); /* apr_sendfile flags */
>
>+ if (APR_ENOTIMPL == rv) {
>+ rv = emulate_sendfile(net, fd, &hdtr, foffset, flen,
>+ &bytes_sent);
>+ }
>+
> if (logio_add_bytes_out && bytes_sent > 0)
> logio_add_bytes_out(c, bytes_sent);
> }