mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
serve http/webdav: factor common http server creation to httplib
This commit is contained in:
16
cmd/serve/httplib/http_new.go
Normal file
16
cmd/serve/httplib/http_new.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user