From da6a8cfc86620300734405d69c527856c0e71d66 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 28 May 2019 18:52:21 -0600 Subject: Minor cleanups --- modules/caddyhttp/caddyhttp.go | 1 - modules/caddyhttp/server.go | 2 ++ modules/caddytls/connpolicy.go | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'modules') 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) } } } diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index 43ddb23..3241d3c 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -104,9 +104,6 @@ type ConnectionPolicy struct { // TODO: Client auth - // TODO: see if starlark could be useful here - enterprise only - StarlarkHandshake string `json:"starlark_handshake,omitempty"` - matchers []ConnectionMatcher certSelector certmagic.CertificateSelector -- cgit v1.2.3