delete repeat code in ut for package ghttp (#3058)

This commit is contained in:
ltp217
2023-10-18 20:04:07 +08:00
committed by GitHub
parent 943939ba2b
commit 93964ee231

View File

@ -753,7 +753,6 @@ func Test_MiddlewareHandlerGzipResponse(t *testing.T) {
_, _ = gzipWriter.Write([]byte("hello"))
// 设置响应头,表明内容使用 gzip 压缩
r.Response.Header().Set("Content-Encoding", "gzip")
r.Response.Header().Set("Content-Encoding", "gzip")
r.Response.Header().Set("Content-Type", "text/plain")
r.Response.Header().Set("Content-Length", fmt.Sprint(buffer.Len()))
// 写入压缩后的内容