summaryrefslogtreecommitdiff
path: root/api/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/server.go')
-rw-r--r--api/server.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/api/server.go b/api/server.go
index 6fafe60f9f..771f3c6cd3 100644
--- a/api/server.go
+++ b/api/server.go
@@ -26,7 +26,6 @@ import (
"strconv"
"strings"
"syscall"
- "time"
)
var (
@@ -883,7 +882,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
var copyData engine.Env
- if contentType := r.Header.Get("Content-Type"); contentType == "application/json" {
+ if contentType := r.Header.Get("Content-Type"); MatchesContentType(contentType, "application/json") {
if err := copyData.Decode(r.Body); err != nil {
return err
}
@@ -1130,7 +1129,7 @@ func changeGroup(addr string, nameOrGid string) error {
// ListenAndServe sets up the required http.Server and gets it listening for
// each addr passed in and does protocol specific checking.
-func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors bool, dockerVersion string, socketGroup string) error {
+func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors bool, dockerVersion, socketGroup string) error {
r, err := createRouter(eng, logging, enableCors, dockerVersion)
if err != nil {
@@ -1147,7 +1146,7 @@ func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors
}
}
- l, err := listenbuffer.NewListenBuffer(proto, addr, activationLock, 15*time.Minute)
+ l, err := listenbuffer.NewListenBuffer(proto, addr, activationLock)
if err != nil {
return err
}