serve http/webdav: factor common http server creation to httplib

This commit is contained in:
Nick Craig-Wood
2018-02-14 20:39:11 +00:00
parent 442334ba61
commit 5530662ccc
7 changed files with 133 additions and 69 deletions

View File

@@ -0,0 +1,16 @@
// HTTP parts go1.8+
//+build go1.8
package httplib
import (
"net/http"
"time"
)
// Initialise the http.Server for post go1.8
func initServer(s *http.Server) {
s.ReadHeaderTimeout = 10 * time.Second // time to send the headers
s.IdleTimeout = 60 * time.Second // time to keep idle connections open
}