mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 12:40:19 +01:00
Cleanup code and improve error messages
This commit is contained in:
parent
9541414476
commit
8ec4d5dbb7
2 changed files with 2 additions and 3 deletions
|
@ -290,7 +290,7 @@ func (s *Server) putHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
n, err := io.CopyN(&b, f, _24K+1)
|
||||
if err != nil && err != io.EOF {
|
||||
log.Printf("%s", err.Error())
|
||||
log.Printf("Error putting new file: %s", err.Error())
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -132,7 +132,6 @@ func UseLetsEncrypt(hosts []string) OptionFn {
|
|||
found := false
|
||||
|
||||
for _, h := range hosts {
|
||||
fmt.Println(h)
|
||||
found = found || strings.HasSuffix(host, h)
|
||||
}
|
||||
|
||||
|
@ -294,7 +293,7 @@ func (s *Server) Run() {
|
|||
|
||||
mime.AddExtensionType(".md", "text/x-markdown")
|
||||
|
||||
log.Printf("Transfer.sh server started. :\nlistening on port: %v\nusing temp folder: %s\nusing storage provider: %s", s.ListenerString, s.tempPath, s.storage.Type())
|
||||
log.Printf("Transfer.sh server started.\nlistening on port: %v\nusing temp folder: %s\nusing storage provider: %s", s.ListenerString, s.tempPath, s.storage.Type())
|
||||
log.Printf("---------------------------")
|
||||
|
||||
h := handlers.PanicHandler(handlers.LogHandler(LoveHandler(s.RedirectHandler(r)), handlers.NewLogOptions(log.Printf, "_default_")), nil)
|
||||
|
|
Loading…
Reference in a new issue