From df3746ad03a20e350092e58e48586fbaa4df48de Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 15 Jun 2021 18:47:37 +0300 Subject: [PATCH 1/3] s3-gw: drop dead code cmd/s3-gw/app-settings.go:31:2 deadcode `defaultKeepaliveTime` is unused cmd/s3-gw/app-settings.go:32:2 deadcode `defaultKeepaliveTimeout` is unused Signed-off-by: Roman Khimov --- cmd/s3-gw/app-settings.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/s3-gw/app-settings.go b/cmd/s3-gw/app-settings.go index 4ae6af3a6..6a4b69845 100644 --- a/cmd/s3-gw/app-settings.go +++ b/cmd/s3-gw/app-settings.go @@ -28,9 +28,6 @@ const ( defaultConnectTimeout = 30 * time.Second defaultShutdownTimeout = 15 * time.Second - defaultKeepaliveTime = 10 * time.Second - defaultKeepaliveTimeout = 10 * time.Second - defaultMaxClientsCount = 100 defaultMaxClientsDeadline = time.Second * 30 ) From b20d249bcd5e5ced49c37679c770ffcc2a012fe1 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 15 Jun 2021 18:48:30 +0300 Subject: [PATCH 2/3] tokens: gofmt Signed-off-by: Roman Khimov --- creds/tokens/credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/creds/tokens/credentials.go b/creds/tokens/credentials.go index a1aa2a86d..903a74fe1 100644 --- a/creds/tokens/credentials.go +++ b/creds/tokens/credentials.go @@ -114,7 +114,7 @@ func (c *cred) getAccessBox(ctx context.Context, address *object.Address) (*acce func (c *cred) Put(ctx context.Context, cid *cid.ID, issuer *owner.ID, box *accessbox.AccessBox, keys ...hcs.PublicKey) (*object.Address, error) { var ( - err error + err error created = strconv.FormatInt(time.Now().Unix(), 10) ) From 996b2d8667aaf7ad8742e1d9b7c0bbfcf929100f Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 15 Jun 2021 18:50:00 +0300 Subject: [PATCH 3/3] auth: add missing comment Signed-off-by: Roman Khimov --- api/auth/center.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/auth/center.go b/api/auth/center.go index 9de0105c5..9bcdc70e1 100644 --- a/api/auth/center.go +++ b/api/auth/center.go @@ -44,6 +44,7 @@ type ( prs int ) +// ErrNoAuthorizationHeader is returned for unauthenticated requests. var ErrNoAuthorizationHeader = errors.New("no authorization header") func (p prs) Read(_ []byte) (n int, err error) {