summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-28 18:52:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-28 18:52:21 -0600
commitda6a8cfc86620300734405d69c527856c0e71d66 (patch)
tree1377f71d3ff0eb247acc9ea5db7b272b5ebe2f6e /modules/caddyhttp
parent9cd6f35e9d4873946060e79cb50643bae8ba8e2c (diff)
Minor cleanups
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)
}
}
}