func RunCGIAndLog(host string, w http.ResponseWriter, r *http.Request, h *cgi.Handler) {
wc := &godlighty.CountResponseWriter{ResponseWriter: w}
+ if r.TLS != nil && len(r.TLS.PeerCertificates) > 0 {
+ h.Env = append(h.Env, "TLSREMOTEDN="+r.TLS.PeerCertificates[0].Subject.String())
+ }
h.ServeHTTP(wc, r)
fmt.Printf("%s %s \"%s %s %s\" %d %d \"%s\"\n",
r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto,