mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-02 14:00:27 +08:00
修复缓存状态码不生效的问题
This commit is contained in:
@@ -50,7 +50,11 @@ func (this *HTTPRequest) doURL(method string, url string, host string, statusCod
|
||||
}
|
||||
|
||||
this.writer.AddHeaders(resp.Header)
|
||||
this.writer.Prepare(resp.ContentLength)
|
||||
if statusCode <= 0 {
|
||||
this.writer.Prepare(resp.ContentLength, resp.StatusCode)
|
||||
} else {
|
||||
this.writer.Prepare(resp.ContentLength, statusCode)
|
||||
}
|
||||
|
||||
// 设置响应代码
|
||||
if statusCode <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user