diff options
author | maride <maride@darknebu.la> | 2019-02-15 17:18:10 +0100 |
---|---|---|
committer | maride <maride@darknebu.la> | 2019-02-15 17:18:10 +0100 |
commit | 1dbc27e6f25a918b42e3b5fc7a149a0a19e9d713 (patch) | |
tree | d4448dd8d8ff0a33b15eb1a5ebe49a7ea2c2a24b /main.go | |
parent | d3d7a27560b339655b15d2d569f7476a957e2a09 (diff) |
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main.go b/main.go index 40a66db..3d4c52c 100644 --- a/main.go +++ b/main.go @@ -27,14 +27,14 @@ func httpHandler(w http.ResponseWriter, r *http.Request) { user, pass, ok := r.BasicAuth() if ok { - // This also includes empty user/pass combos (if they are correctly encoded) - // To avoid them, use `len(user) > 0 && len(pass) > 0` - log.Printf("%s: %s %s:%s@%s%s", r.RemoteAddr, r.Method, user, pass, r.Host, r.URL.Path) - - // Raise stats - metrics_num_passwords++ + // This also includes empty user/pass combos (if they are correctly encoded) + // To avoid them, use `len(user) > 0 && len(pass) > 0` + log.Printf("%s: %s %s:%s@%s%s", r.RemoteAddr, r.Method, user, pass, r.Host, r.URL.Path) + + // Raise stats + metrics_num_passwords++ } else { - log.Printf("%s: %s %s%s", r.RemoteAddr, r.Method, r.Host, r.URL.Path) + log.Printf("%s: %s %s%s", r.RemoteAddr, r.Method, r.Host, r.URL.Path) } // Decline that try |