Repository: caddyserver/caddy (language: go)

Issue:
http.handlers.static_response fails to canonicalize header field names
When using `http.handlers.static_response` to define additional http response headers the header names are not canonicalized when preparing the headers.
This leads to a duplicate content-type header in the response.
I've created a PR to add a call to `textproto.CanonicalMIMEHeaderKey()` to fix this.

### config.json with lower-case `content-type`

```json
{"apps":{"http":{"servers":{"srv0":{"listen":[":443"],"routes":[{"match":[{"host":["localhost"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"body":"Hello, world!","handler":"static_response","headers":{"content-type":["text/html"]}}]}]}],"terminal":true}]}}}}}
```
### headers received:
```
HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=2592000
Content-Length: 13
Content-Type: text/plain; charset=utf-8, text/html
Date: Thu, 27 Oct 2022 16:19:58 GMT
Server: Caddy
```
### headers expected:
```
HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=2592000
Content-Length: 13
Content-Type: text/html
Date: Thu, 27 Oct 2022 16:19:58 GMT
Server: Caddy
``` 


Discussion / hints:

Fix patch:
diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go
index 411a7bcc567..add5b121b5a 100644
--- a/modules/caddyhttp/staticresp.go
+++ b/modules/caddyhttp/staticresp.go
@@ -21,6 +21,7 @@ import (
 	"fmt"
 	"io"
 	"net/http"
+	"net/textproto"
 	"os"
 	"strconv"
 	"strings"
@@ -193,7 +194,7 @@ func (s StaticResponse) ServeHTTP(w http.ResponseWriter, r *http.Request, next H
 
 	// set all headers
 	for field, vals := range s.Headers {
-		field = repl.ReplaceAll(field, "")
+		field = textproto.CanonicalMIMEHeaderKey(repl.ReplaceAll(field, ""))
 		newVals := make([]string, len(vals))
 		for i := range vals {
 			newVals[i] = repl.ReplaceAll(vals[i], "")


Test patch: