fixup new codec detection
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
d3d67eca97
commit
28d23f388f
@ -251,8 +251,8 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set(k, v)
|
||||
}
|
||||
}
|
||||
if ct != w.Header().Get("Content-Type") {
|
||||
if cf, err = h.newCodec(ct); err != nil {
|
||||
if nct := w.Header().Get("Content-Type"); nct != ct {
|
||||
if cf, err = h.newCodec(nct); err != nil {
|
||||
h.errorHandler(ctx, nil, w, r, err, http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user