Skip to content

Commit 5847075

Browse files
mxpvthaJeztah
authored andcommitted
Run gofmt 1.19
Signed-off-by: Maksym Pavlenko <[email protected]> (cherry picked from commit ca3b9b5) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f33e385 commit 5847075

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

content/local/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
"github.com/containerd/containerd/log"
3535
"github.com/sirupsen/logrus"
3636

37-
digest "github.com/opencontainers/go-digest"
37+
"github.com/opencontainers/go-digest"
3838
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
3939
)
4040

pkg/cri/streaming/server.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import (
4545
"google.golang.org/grpc/codes"
4646
"google.golang.org/grpc/status"
4747

48-
restful "github.com/emicklei/go-restful"
48+
"github.com/emicklei/go-restful"
4949

5050
"k8s.io/apimachinery/pkg/types"
5151
remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand"
@@ -162,9 +162,10 @@ func NewServer(config Config, runtime Runtime) (Server, error) {
162162
handler.Add(ws)
163163
s.handler = handler
164164
s.server = &http.Server{
165-
Addr: s.config.Addr,
166-
Handler: s.handler,
167-
TLSConfig: s.config.TLSConfig,
165+
Addr: s.config.Addr,
166+
Handler: s.handler,
167+
TLSConfig: s.config.TLSConfig,
168+
ReadHeaderTimeout: 3 * time.Second, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
168169
}
169170

170171
return s, nil

0 commit comments

Comments
 (0)