From 0d442683ee7c3ea3dc5fdd8aa0a71622cd71a1a3 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 10 Apr 2021 12:38:11 +0300 Subject: [PATCH] properly detect content-type Signed-off-by: Vasiliy Tolstov --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 4581070..9e21b53 100644 --- a/handler.go +++ b/handler.go @@ -78,7 +78,7 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { ct := DefaultContentType if htype := r.Header.Get("Content-Type"); htype != "" { - ct = htype + ct = strings.Split(htype, ";")[0] } var cf codec.Codec