From: Ryan Bloom Date: Thu, 6 Apr 2000 23:53:59 +0000 (+0000) Subject: Make the server work without asking for buffered file I/O. This removes X-Git-Tag: apache-doc-split-01~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db9d037c3627dbc5461d69e515801c033427dba2;p=thirdparty%2Fapache%2Fhttpd.git Make the server work without asking for buffered file I/O. This removes all APR_BUFFERED flags from the server, and it fixes a minor bug in the ungetchar patch (I forgot a file when comitting). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84933 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index e9468a87d62..4466e9c00c6 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -82,7 +82,7 @@ static int asis_handler(request_rec *r) return NOT_FOUND; } - if ((status = ap_open(&f, r->filename, APR_READ | APR_BUFFERED, + if ((status = ap_open(&f, r->filename, APR_READ, APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, "file permissions deny server access: %s", r->filename); diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index d908987676b..579d7e1d238 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -992,7 +992,7 @@ static void emit_head(request_rec *r, char *header_fname, int suppress_amble, * the file's contents, any HTML header it had won't end up * where it belongs. */ - if (ap_open(&f, rr->filename, APR_READ | APR_BUFFERED, + if (ap_open(&f, rr->filename, APR_READ, APR_OS_DEFAULT, r->pool) == APR_SUCCESS) { emit_preamble(r, title); emit_amble = 0; @@ -1060,7 +1060,7 @@ static void emit_tail(request_rec *r, char *readme_fname, int suppress_amble) /* * If we can open the file, suppress the signature. */ - if (ap_open(&f, rr->filename, APR_READ | APR_BUFFERED, + if (ap_open(&f, rr->filename, APR_READ, APR_OS_DEFAULT, r->pool) == APR_SUCCESS) { do_emit_plain(r, f); ap_close(f); @@ -1097,7 +1097,7 @@ static char *find_title(request_rec *r) "text/html") || !strcmp(r->content_type, INCLUDES_MAGIC_TYPE)) && !r->content_encoding) { - if (ap_open(&thefile, r->filename, APR_READ | APR_BUFFERED, + if (ap_open(&thefile, r->filename, APR_READ, APR_OS_DEFAULT, r->pool) != APR_SUCCESS) { return NULL; } diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 14724697807..feee4126bbe 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -185,7 +185,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret, ((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (ap_open(&f, ap_server_root_relative(r->pool, conf->logname), - APR_APPEND | APR_BUFFERED, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { + APR_APPEND, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { return ret; } diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 0ba21c50138..06b2c1a1636 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -792,7 +792,7 @@ static int read_type_map(negotiation_state *neg, request_rec *rr) /* We are not using multiviews */ neg->count_multiviews_variants = 0; - if ((status = ap_open(&map, rr->filename, APR_READ | APR_BUFFERED, + if ((status = ap_open(&map, rr->filename, APR_READ, APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, "cannot access type map file: %s", rr->filename); diff --git a/server/util.c b/server/util.c index 3a05d7ce50e..0827a326d98 100644 --- a/server/util.c +++ b/server/util.c @@ -848,7 +848,7 @@ API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, ap_context_t *p return APR_EACCES; } - stat = ap_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p); + stat = ap_open(&file, name, APR_READ, APR_OS_DEFAULT, p); #ifdef DEBUG ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL, "Opening config file %s (%s)",