diff options
-rw-r--r-- | src/http/http.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/http.go b/src/http/http.go index b4c3045..76cb6b6 100644 --- a/src/http/http.go +++ b/src/http/http.go @@ -195,8 +195,8 @@ func pathHandler(w http.ResponseWriter, r *http.Request) { // define the file or dir's url var url string - if r.RequestURI != "/" { - url = fmt.Sprintf("%s/%s", r.RequestURI, f.Name()) + if r.URL.Path != "/" { + url = fmt.Sprintf("%s/%s", r.URL.Path, f.Name()) } else { url = fmt.Sprintf("/%s", f.Name()) } |