You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/04 21:46:22 UTC
cvs commit: apache-2.0/src/modules/standard mod_cgid.c
trawick 00/06/04 12:46:22
Modified: src CHANGES
src/modules/standard mod_cgid.c
Log:
mod_cgid:
fix parmlist to ap_open() so that we can open the ScriptLog file o.k.
in log_script(), don't do anything with script_err parm if it is NULL
(for mod_cgid, it is always NULL; rather than simply ripping out such
logic I kept it in case somebody wants to factor out common parts of
mod_cgi.c and mod_cgid.c later)
Revision Changes Path
1.132 +2 -1 apache-2.0/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-2.0/src/CHANGES,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- CHANGES 2000/06/03 22:40:57 1.131
+++ CHANGES 2000/06/04 19:46:21 1.132
@@ -7,7 +7,8 @@
and know that they will be called at an appropriate time.
[Ryan Bloom]
- *) mod_cgi: Make ScriptLog directive work again. [Jeff Trawick]
+ *) mod_cgi, mod_cgid: Make ScriptLog directive work again.
+ [Jeff Trawick]
*) Add pre-config hooks back to all modules.
[Ryan Bloom]
1.14 +17 -11 apache-2.0/src/modules/standard/mod_cgid.c
Index: mod_cgid.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgid.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_cgid.c 2000/06/03 22:41:01 1.13
+++ mod_cgid.c 2000/06/04 19:46:22 1.14
@@ -681,7 +681,7 @@
((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_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
+ APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
return ret;
}
@@ -713,12 +713,14 @@
((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_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
+ APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
/* Soak up script output */
while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0)
continue;
- while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
- continue;
+ if (script_err) {
+ while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
+ continue;
+ }
return ret;
}
@@ -761,16 +763,20 @@
ap_puts("\n", f);
}
- if (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
- ap_puts("%stderr\n", f);
- ap_puts(argsbuffer, f);
- while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
+ if (script_err) {
+ if (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
+ ap_puts("%stderr\n", f);
ap_puts(argsbuffer, f);
- ap_puts("\n", f);
- }
+ while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
+ ap_puts(argsbuffer, f);
+ ap_puts("\n", f);
+ }
+ }
ap_bclose(script_in);
- ap_bclose(script_err);
+ if (script_err) {
+ ap_bclose(script_err);
+ }
ap_close(f);
return ret;