From: Jeff Trawick Date: Fri, 24 Aug 2001 03:04:44 +0000 (+0000) Subject: buffer .var maps to avoid asking the kernel for one byte at a X-Git-Tag: 2.0.25~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc961d67bdc3accb0ae9d0f8146b0329534a0e61;p=apache 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 --- diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 4c11f397ce..cc69acf463 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -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);