summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/caddyhttp.go1
-rw-r--r--modules/caddyhttp/server.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go
index 305a918..8255032 100644
--- a/modules/caddyhttp/caddyhttp.go
+++ b/modules/caddyhttp/caddyhttp.go
@@ -24,7 +24,6 @@ func init() {
Name: "http",
New: func() interface{} { return new(App) },
})
-
if err != nil {
log.Fatal(err)
}
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index 4a1aafd..a7fe02d 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -77,6 +77,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.Printf("[ERROR] Handler: %s", err)
if handlerErr, ok := err.(HandlerError); ok {
w.WriteHeader(handlerErr.StatusCode)
+ } else {
+ w.WriteHeader(http.StatusInternalServerError)
}
}
}