From d955038ebc8074ef12ff18fe37d59bcf441ff86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Mon, 29 Nov 2021 16:05:58 +0800 Subject: [PATCH] :sparkles: delete useless path unescape --- server/down.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/down.go b/server/down.go index 5269b63b..bb27396e 100644 --- a/server/down.go +++ b/server/down.go @@ -14,11 +14,7 @@ import ( ) func Down(c *gin.Context) { - rawPath, err := url.PathUnescape(c.Param("path")) - if err != nil { - ErrorResp(c, err, 500) - return - } + rawPath := c.Param("path") rawPath = utils.ParsePath(rawPath) log.Debugf("down: %s", rawPath) pw := c.Query("pw") @@ -50,11 +46,7 @@ func Down(c *gin.Context) { } func Proxy(c *gin.Context) { - rawPath, err := url.PathUnescape(c.Param("path")) - if err != nil { - ErrorResp(c, err, 500) - return - } + rawPath := c.Param("path") rawPath = utils.ParsePath(rawPath) log.Debugf("proxy: %s", rawPath) pw := c.Query("pw")