mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-30 01:37:04 +08:00
修复Websocket连接无法报告连接关闭的问题
This commit is contained in:
@@ -339,7 +339,7 @@ func (this *HTTPWriter) PrepareCache(resp *http.Response, size int64) {
|
||||
|
||||
cacheWriter, err := storage.OpenWriter(cacheKey, expiresAt, this.StatusCode(), this.calculateHeaderLength(), totalSize, cacheRef.MaxSizeBytes(), this.isPartial)
|
||||
if err != nil {
|
||||
if err == caches.ErrEntityTooLarge && addStatusHeader {
|
||||
if errors.Is(err, caches.ErrEntityTooLarge) && addStatusHeader {
|
||||
this.Header().Set("X-Cache", "BYPASS, entity too large")
|
||||
}
|
||||
|
||||
@@ -968,6 +968,7 @@ func (this *HTTPWriter) Close() {
|
||||
func (this *HTTPWriter) Hijack() (conn net.Conn, buf *bufio.ReadWriter, err error) {
|
||||
hijack, ok := this.rawWriter.(http.Hijacker)
|
||||
if ok {
|
||||
this.req.isHijacked = true
|
||||
return hijack.Hijack()
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user