Commit 8ddd53f5 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

buffer .var maps to avoid asking the kernel for one byte at a

time

note that a system trace of .var map processing still shows an
extra read() after we hit EOF the first time; we could make
use of the EOF flag in APR to avoid the read() or play with
mod_negotiation

Suggested by:	Marc Slemko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90609 13f79535-47bb-0310-9956-ffa450edef68
parent e23d1bdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -854,7 +854,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg, request_rec *
    /* We are not using multiviews */
    neg->count_multiviews_variants = 0;

    if ((status = apr_file_open(map, rr->filename, APR_READ,
    if ((status = apr_file_open(map, rr->filename, APR_READ | APR_BUFFERED,
                APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
                      "cannot access type map file: %s", rr->filename);