summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorHorus32015-05-09 01:57:32 +0200
committerHorus32015-05-09 01:57:32 +0200
commit9c757388f1974b32a2f88cf36b709a160491baf8 (patch)
tree5111934ab42db0f1beafd16ffea5fb04d9350478 /main.go
parent5def3f17f1809eb3727efd21d4b482452620342b (diff)
downloaduhttpd-9c757388f1974b32a2f88cf36b709a160491baf8.tar.gz
Show pretty html pages.
Diffstat (limited to 'main.go')
-rw-r--r--main.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.go b/main.go
index 36781f2..9ec7157 100644
--- a/main.go
+++ b/main.go
@@ -11,11 +11,20 @@ import (
)
func accessLog(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ t := &TemplateHandler{handler: h}
+ //t := &TemplateHandler{}
+ fn := func(w http.ResponseWriter, r *http.Request) {
log.Println(r.Method, r.URL.Path, r.RemoteAddr)
- h.ServeHTTP(w, r)
- })
+ t.ServeHTTP(w, r)
+ }
+ return http.HandlerFunc(fn)
+}
+
+/*
+func TemplateHandler(h http.Handler) http.Handler {
+ h.handler
}
+*/
func uploadHandler(dir string) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {