From f0aafb1a3bdeee4c80ddb7f3854528de9e149d6c Mon Sep 17 00:00:00 2001 From: YuXiaoFeng <43255432@qq.com> Date: Sun, 15 Dec 2019 15:48:55 +0800 Subject: [PATCH] http plugin lost status code (#38) when http server response non 200 code, the plugin always return 200. --- plugins/http/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/http/server.go b/plugins/http/server.go index 1bba6d4..143a56b 100644 --- a/plugins/http/server.go +++ b/plugins/http/server.go @@ -122,6 +122,7 @@ func (rww *responseWriterWrapper) Write(bytes []byte) (int, error) { func (rww *responseWriterWrapper) WriteHeader(statusCode int) { rww.statusCode = statusCode + rww.w.WriteHeader(statusCode) } func getOperationName(name string, r *http.Request) string { -- GitLab