Log a single dash (`-') if referer or user-agent header is missing/unknown
This commit is contained in:
parent
862dd31c88
commit
d5dcbace37
|
@ -136,7 +136,7 @@
|
|||
(define (get-header headers tag)
|
||||
(cond
|
||||
((assq tag headers) => cdr)
|
||||
(else "unknown")))
|
||||
(else #f)))
|
||||
|
||||
;; does the log-file rotation on signal USR1
|
||||
(define (make-log-file-rotator log-file http-log-lock)
|
||||
|
@ -176,10 +176,10 @@
|
|||
; Files conform to CLF are expected to print the original line.
|
||||
(or http-code "-")
|
||||
(or filesize "-")
|
||||
(if (string? referer) (string-trim referer) "")
|
||||
(if (string? referer) (string-trim referer) '-)
|
||||
(if (string? user-agent)
|
||||
(string-trim user-agent char-set:whitespace)
|
||||
"")))
|
||||
'-)))
|
||||
|
||||
|
||||
(define (maybe-dns-lookup remote-ip)
|
||||
|
|
Loading…
Reference in New Issue