]> 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 18:57:23 +0000 (19:57 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Wed, 4 Mar 2015 18:57:23 +0000 (19:57 +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.

log.c

diff --git a/log.c b/log.c
index 9ad736fb7518686f8c1140e20b71a89df1d54d5c..1d4c48aaf88bee742b94e051a4a0bdcbbbe91060 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1478,8 +1478,10 @@ int main(int argc,char *argv[])
                                }
                        }
 #ifdef ENABLE_DOUBLE_CHECK_DATA
-                       ufile->user->nbytes+=nbytes;
-                       ufile->user->elap+=elap_time;
+                       if (strcmp(code,"TCP_DENIED/407")!=0) {
+                               ufile->user->nbytes+=nbytes;
+                               ufile->user->elap+=elap_time;
+                       }
 #endif
 
                        if (ufile->file==NULL) {