Procházet zdrojové kódy

Fix encoding of spaces in filenames from + to %20

tags/v1.1.0
JustAnotherArchivist před 5 roky
rodič
revize
568f917c67
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +2
    -2
      server/handlers.go

+ 2
- 2
server/handlers.go Zobrazit soubor

@@ -328,7 +328,7 @@ func (s *Server) postHandler(w http.ResponseWriter, r *http.Request) {

}

filename = url.QueryEscape(filename)
filename = url.PathEscape(filename)
relativeURL, _ := url.Parse(path.Join(s.proxyPath, token, filename))
fmt.Fprintln(w, getURL(r).ResolveReference(relativeURL).String())

@@ -487,7 +487,7 @@ func (s *Server) putHandler(w http.ResponseWriter, r *http.Request) {

w.Header().Set("Content-Type", "text/plain")

filename = url.QueryEscape(filename)
filename = url.PathEscape(filename)
relativeURL, _ := url.Parse(path.Join(s.proxyPath, token, filename))
deleteURL, _ := url.Parse(path.Join(s.proxyPath, token, filename, metadata.DeletionToken))



Načítá se…
Zrušit
Uložit