修复内容为空时无法缓存的Bug

This commit is contained in:
GoEdgeLab
2022-06-09 20:26:36 +08:00
parent fb5029bad1
commit 366d0d74b1
3 changed files with 9 additions and 2 deletions

View File

@@ -836,7 +836,7 @@ func (this *HTTPWriter) HeaderData() []byte {
return nil
}
resp := &http.Response{}
var resp = &http.Response{}
resp.Header = this.Header()
if this.statusCode == 0 {
this.statusCode = http.StatusOK