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