apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Date Wed, 22 Jul 2009 23:24:07 GMT
#define APR_FOPEN_SENDFILE_ENABLED 0x01000 /**< Advisory flag that this
                                              file should support
operation */

Is there a reason why this flag is not always enabled? If the OS  
supports sendfile, we should probably always prepare it for sendfile.  
By requiring this flag, we are unnecessarily binding the open() and  
sendfile() calls, which in the case of httpd pretty much means that  
sendfile() isn't getting used everywhere that it could be (eg. in  
various modules). The only place where I see that this flag makes a  
difference is on windows when testing for unicode support. Can we just  
set it up so that the descriptor returned from apr_file_open() can  
always optionally be used in an apr_socket_sendfile() call if later  
desired, and if the OS supports it, or will that cause problems on any  
non-unix platforms?


View raw message