refactor(http): proper ResponseWriter and headers handling across files

This commit is contained in:
yusing
2025-10-28 14:43:10 +08:00
parent f29b69ff3b
commit d4dfec8293
3 changed files with 34 additions and 3 deletions

View File

@@ -158,6 +158,8 @@ func (rm *ResponseModifier) FlushRelease() (int, error) {
// }
contentLength := rm.ContentLength()
h.Set("Content-Length", strconv.Itoa(rm.ContentLength()))
h.Del("Transfer-Encoding")
h.Del("Trailer")
rm.w.WriteHeader(rm.StatusCode())
if contentLength > 0 {