From b18a907dadf6608a79676b2f4f1140280747d310 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 16 Jun 2000 16:41:21 +0000 Subject: [PATCH] Turn on buffering for config file reads. This is dependent on ap_fgets() doing the right thing. Brian Havard implemented buffering for ap_fgets() on Win32 recently; OS/2 had it already. This provides it for Unix. changes to ap_read(), ap_getc(), ap_fgets() for Unix: 1) this fixes a problem in where ap_open() where a lock is created for non-buffered files 2) this fixes problems setting rv correctly in the ap_read() buffered path 3) since ap_read() works as expected, it is possible to make ap_getc() and ap_fgets() even smaller 4) ap_fgets() no longer cares about '\r' git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85586 13f79535-47bb-0310-9956-ffa450edef68 --- server/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/util.c b/server/util.c index 4ac6f7db9e..daa4227e3d 100644 --- a/server/util.c +++ b/server/util.c @@ -874,7 +874,7 @@ API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, ap_pool_t *p, c return APR_EACCES; } - status = ap_open(&file, name, APR_READ, APR_OS_DEFAULT, p); + status = ap_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p); #ifdef DEBUG ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL, "Opening config file %s (%s)", -- 2.40.0