From 4de1451a4269af021b81c8120be68699c12746cc Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 24 Dec 2020 19:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E5=92=8C?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E8=BD=AC=E5=8F=91=E6=94=AF=E6=8C=81=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E7=AD=89UTF-8=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/const/const.go | 2 +- internal/nodes/http_request.go | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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{ // 缓存相关初始化