mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-27 10:01:54 +08:00
优化字节缓冲区相关代码
This commit is contained in:
@@ -206,9 +206,9 @@ func (this *HTTPRequest) doFastcgi() (shouldStop bool) {
|
||||
this.writer.WriteHeader(resp.StatusCode)
|
||||
|
||||
// 输出到客户端
|
||||
pool := this.bytePool(resp.ContentLength)
|
||||
buf := pool.Get()
|
||||
_, err = io.CopyBuffer(this.writer, resp.Body, buf)
|
||||
var pool = this.bytePool(resp.ContentLength)
|
||||
var buf = pool.Get()
|
||||
_, err = io.CopyBuffer(this.writer, resp.Body, buf.Bytes)
|
||||
pool.Put(buf)
|
||||
|
||||
closeErr := resp.Body.Close()
|
||||
|
||||
Reference in New Issue
Block a user