From 510b0fb62ac31937c57b0acb056e783a4c40a8eb Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 18 Jun 2013 15:20:14 -0400 Subject: [PATCH] adding a debugging Header printout --- httplog.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/httplog.go b/httplog.go index bd1b281..b511093 100644 --- a/httplog.go +++ b/httplog.go @@ -7,6 +7,17 @@ import ( "time" ) +// for debugging request headers +func LogHeaders(r *http.Request) { + fmt.Printf("HEADERS:\n") + for k, v := range r.Header { + fmt.Printf("\t%s\n", k) + for i, _ := range v { + fmt.Printf("\t\t%s\n", v[i]) + } + } +} + /* kindof a common log type output */ func LogRequest(r *http.Request, statusCode int) { var addr string