You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/07/17 07:38:43 UTC

[PATCH] PR#421, PR#868: mod_auth_anon logs multiple times

Without commenting on the appropriateness of logging this stuff in the
error_log, here's a patch which stops mod_auth_anon from logging for each
sub_request. 

Dean

Index: mod_auth_anon.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_auth_anon.c,v
retrieving revision 1.16
diff -u -r1.16 mod_auth_anon.c
--- mod_auth_anon.c	1997/06/17 00:09:13	1.16
+++ mod_auth_anon.c	1997/07/17 05:36:20
@@ -93,6 +93,7 @@
 #include "http_core.h"
 #include "http_log.h"
 #include "http_protocol.h"
+#include "http_request.h"
 
 typedef struct auth_anon {
     char *password;
@@ -205,7 +206,6 @@
     char *send_pw;
     char errstr[MAX_STRING_LEN];
     int res=DECLINED;
-    
 
     if ((res=get_basic_auth_pw (r,&send_pw)))
 	return res;
@@ -239,7 +239,7 @@
 	      (strpbrk(".",send_pw) != NULL))
 	  ) 
 	) {
-      if (sec->auth_anon_logemail) {
+      if (sec->auth_anon_logemail && is_initial_req(r)) {
 	ap_snprintf(errstr, sizeof(errstr), "Anonymous: Passwd <%s> Accepted", 
 			send_pw ? send_pw : "\'none\'");
 	log_error (errstr, r->server );