Commit eb85e8e3 authored by astaxie's avatar astaxie

path.Clean can't clean window separate .."

"
parent e2672049
......@@ -18,6 +18,7 @@ import (
"net/http"
"os"
"path"
"path/filepath"
"strconv"
"strings"
......@@ -29,7 +30,7 @@ func serverStaticRouter(ctx *context.Context) {
if ctx.Input.Method() != "GET" && ctx.Input.Method() != "HEAD" {
return
}
requestPath := path.Clean(ctx.Input.Request.URL.Path)
requestPath := filepath.Clean(ctx.Input.Request.URL.Path)
i := 0
for prefix, staticDir := range StaticDir {
if len(prefix) == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment