1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-29 22:48:07 +02:00

Fixed url.PathUnescape for go1.7

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2017-06-07 08:55:40 -07:00
parent c05db06020
commit dc0f2d7327
4 changed files with 24 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ package middleware
import (
"fmt"
"net/url"
"os"
"path"
"path/filepath"
@@ -76,7 +75,7 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
if strings.HasSuffix(c.Path(), "*") { // When serving from a group, e.g. `/static*`.
p = c.Param("*")
}
p, err = url.PathUnescape(p)
p, err = echo.PathUnescape(p)
if err != nil {
return err
}