properly detect content-type

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-04-10 12:38:11 +03:00
parent c8587ec93a
commit 0d442683ee

View File

@ -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