diff --git a/internal/const/const.go b/internal/const/const.go index c934293..9578dfc 100644 --- a/internal/const/const.go +++ b/internal/const/const.go @@ -1,7 +1,7 @@ package teaconst const ( - Version = "0.0.6" + Version = "0.0.6.1" ProductName = "Edge Node" ProcessName = "edge-node" diff --git a/internal/nodes/http_request.go b/internal/nodes/http_request.go index 46ae244..7b5a69b 100644 --- a/internal/nodes/http_request.go +++ b/internal/nodes/http_request.go @@ -74,7 +74,15 @@ type HTTPRequest struct { func (this *HTTPRequest) init() { this.writer = NewHTTPWriter(this, this.RawWriter) this.web = &serverconfigs.HTTPWebConfig{IsOn: true} - this.uri = this.RawReq.URL.RequestURI() + //this.uri = this.RawReq.URL.RequestURI() + // 之所以不使用RequestURI(),是不想让URL中的Path被Encode + if len(this.RawReq.URL.RawQuery) > 0 { + this.uri = this.RawReq.URL.Path + "?" + this.RawReq.URL.RawQuery + } else { + this.uri = this.RawReq.URL.Path + } + + this.uri = this.RawReq.URL.Path this.rawURI = this.uri this.varMapping = map[string]string{ // 缓存相关初始化