mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-08 02:40:32 +08:00
重构对HTTP请求的处理方法:缓存、压缩、WebP、限速
This commit is contained in:
@@ -285,10 +285,10 @@ func (this *HTTPRequest) doReverseProxy() {
|
||||
this.processResponseHeaders(resp.StatusCode)
|
||||
|
||||
// 是否需要刷新
|
||||
shouldAutoFlush := this.reverseProxy.AutoFlush || this.RawReq.Header.Get("Accept") == "text/event-stream"
|
||||
var shouldAutoFlush = this.reverseProxy.AutoFlush || this.RawReq.Header.Get("Accept") == "text/event-stream"
|
||||
|
||||
// 准备
|
||||
delayHeaders := this.writer.Prepare(resp.ContentLength, resp.StatusCode)
|
||||
var delayHeaders = this.writer.Prepare(resp, resp.ContentLength, resp.StatusCode, true)
|
||||
|
||||
// 设置响应代码
|
||||
if !delayHeaders {
|
||||
|
||||
Reference in New Issue
Block a user