Merge pull request #2 from PapiCZ/puthandler-add-newline

Fixed newline char bug in putHandler
This commit is contained in:
Patrik Janoušek 2018-04-10 16:53:18 +02:00 committed by GitHub
commit 5954662f8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -411,7 +411,7 @@ func (s *Server) putHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
relativeURL, _ := url.Parse(path.Join(token, filename))
fmt.Fprint(w, getURL(r).ResolveReference(relativeURL).String())
fmt.Fprint(w, getURL(r).ResolveReference(relativeURL).String() + "\n")
}
func getURL(r *http.Request) *url.URL {