cgi_server_conf *conf = ap_get_module_config(s->module_config,
&cgi_module);
- conf->logname = arg;
+ conf->logname = ap_server_root_relative(cmd->pool, arg);
return NULL;
}
ap_log_rerror(APLOG_MARK, log_flags, rv, r,
"%s: %s", error, r->filename);
+ /* XXX Very expensive mainline case! Open, then getfileinfo! */
if (!conf->logname ||
- ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
+ ((apr_stat(&finfo, conf->logname,
APR_FINFO_SIZE, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
- (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, conf->logname,
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool)
!= APR_SUCCESS)) {
return ret;
apr_finfo_t finfo;
char time_str[APR_CTIME_LEN];
+ /* XXX Very expensive mainline case! Open, then getfileinfo! */
if (!conf->logname ||
- ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
+ ((apr_stat(&finfo, conf->logname,
APR_FINFO_SIZE, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
- (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, conf->logname,
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
/* Soak up script output */
while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
cgid_server_conf *conf = ap_get_module_config(s->module_config,
&cgid_module);
- conf->logname = arg;
+ conf->logname = ap_server_root_relative(cfg->pool, arg);
return NULL;
}
ap_log_rerror(APLOG_MARK, log_flags, rv, r,
"%s: %s", error, r->filename);
+ /* XXX Very expensive mainline case! Open, then getfileinfo! */
if (!conf->logname ||
- ((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
+ ((stat(conf->logname, &finfo) == 0)
&& (finfo.st_size > conf->logbytes)) ||
- (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, r->pool, conf->logname,
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
return ret;
}
struct stat finfo;
char time_str[APR_CTIME_LEN];
+ /* XXX Very expensive mainline case! Open, then getfileinfo! */
if (!conf->logname ||
- ((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
+ ((stat(conf->logname, &finfo) == 0)
&& (finfo.st_size > conf->logbytes)) ||
- (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, conf->logname,
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
/* Soak up script output */
while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)