diff options
author | Matthew Holt <[email protected]> | 2019-06-14 11:58:28 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-06-14 11:58:28 -0600 |
commit | 5137859e47678aae81e178ca7d164f9e2b4e3121 (patch) | |
tree | f0e5cb9b9a4ad5dc03b53127fcea2a536bd6ee27 /modules/caddyhttp/server.go | |
parent | b8e7453fef3dac6036403bc384eec96becff5114 (diff) | |
download | caddy-5137859e47678aae81e178ca7d164f9e2b4e3121.tar.gz caddy-5137859e47678aae81e178ca7d164f9e2b4e3121.zip |
Rename caddy2 -> caddy
Removes the version from the package name
Diffstat (limited to 'modules/caddyhttp/server.go')
-rw-r--r-- | modules/caddyhttp/server.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index a2199cad7..3de82f650 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -8,17 +8,17 @@ import ( "net/http" "strconv" - "github.com/caddyserver/caddy2" - "github.com/caddyserver/caddy2/modules/caddytls" + "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/modules/caddytls" ) // Server is an HTTP server. type Server struct { Listen []string `json:"listen,omitempty"` - ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"` - ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"` - WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"` - IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"` + ReadTimeout caddy.Duration `json:"read_timeout,omitempty"` + ReadHeaderTimeout caddy.Duration `json:"read_header_timeout,omitempty"` + WriteTimeout caddy.Duration `json:"write_timeout,omitempty"` + IdleTimeout caddy.Duration `json:"idle_timeout,omitempty"` MaxHeaderBytes int `json:"max_header_bytes,omitempty"` Routes RouteList `json:"routes,omitempty"` Errors *httpErrorConfig `json:"errors,omitempty"` @@ -38,8 +38,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } // set up the context for the request - repl := caddy2.NewReplacer() - ctx := context.WithValue(r.Context(), caddy2.ReplacerCtxKey, repl) + repl := caddy.NewReplacer() + ctx := context.WithValue(r.Context(), caddy.ReplacerCtxKey, repl) ctx = context.WithValue(ctx, TableCtxKey, make(map[string]interface{})) // TODO: Implement this r = r.WithContext(ctx) @@ -127,4 +127,4 @@ type httpErrorConfig struct { } // TableCtxKey is the context key for the request's variable table. -const TableCtxKey caddy2.CtxKey = "table" +const TableCtxKey caddy.CtxKey = "table" |