反向代理实现AutoFlush/修复配置自动加载问题

This commit is contained in:
GoEdgeLab
2020-09-27 18:41:56 +08:00
parent ee2281b581
commit 6f3d688ece
14 changed files with 101 additions and 23 deletions

View File

@@ -7,7 +7,6 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/iwind/TeaGo/logs"
"github.com/iwind/TeaGo/types"
"net"
"net/http"
@@ -141,9 +140,6 @@ func (this *HTTPRequest) doBegin() {
// Fastcgi
// TODO
// Server Event Sent
// TODO 实现Location的AutoFlush
// 返回404页面
this.write404()
}
@@ -234,7 +230,6 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
if !location.IsOn {
continue
}
logs.Println("rawPath:", rawPath, "location:", location.Pattern) // TODO
if varMapping, isMatched := location.Match(rawPath, this.Format); isMatched {
if len(varMapping) > 0 {
this.addVarMapping(varMapping)