Commit 16b9dfa0 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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
parent cbb137a5
Loading
Loading
Loading
Loading
+1 −1
Changes for modules/generators/mod_asis.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);
+3 −3
Changes for modules/generators/mod_autoindex.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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;
	}
+1 −1
Changes for modules/generators/mod_cgi.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
    }

+1 −1
Changes for modules/mappers/mod_negotiation.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);
+1 −1
Changes for server/util.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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)",