]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Proxy authentication code is ignored when building the report
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Wed, 4 Mar 2015 19:27:21 +0000 (20:27 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Wed, 4 Mar 2015 19:27:21 +0000 (20:27 +0100)
The user report excludes HTTP code 407 meaning that the proxy requires an
authentication.

It must be excluded too when summing up the downloaded size while reading
the input log. The previous code aborted with an error if
--enable-extraprotection was used and the log contained a 407 code.

Conflicts:
log.c

readlog.c

index c070338175288ed3d5339109ebaf96436379254d..dfdf21ec290a690b3f8c6611bcf7687b68395e9a 100644 (file)
--- a/readlog.c
+++ b/readlog.c
@@ -577,8 +577,10 @@ static void ReadOneLogFile(struct ReadLogDataStruct *Filter,const char *arq)
                        }
                }
 #ifdef ENABLE_DOUBLE_CHECK_DATA
-               ufile->user->nbytes+=log_entry.DataSize;
-               ufile->user->elap+=log_entry.ElapsedTime;
+               if (strcmp(log_entry.HttpCode,"TCP_DENIED/407")!=0) {
+                       ufile->user->nbytes+=log_entry.DataSize;
+                       ufile->user->elap+=log_entry.ElapsedTime;
+               }
 #endif
 
                if (ufile->file==NULL) {