From 3b6fd0d5d064b0b6a403aa7adff625142d630898 Mon Sep 17 00:00:00 2001 From: Ray Johnson Date: Mon, 11 Dec 2023 17:34:51 +0000 Subject: [PATCH] apply fix from pr, add lint config --- .standard-lint.yml | 31 +++++++++++++++++++++++++++++++ s3proxy.go | 1 + 2 files changed, 32 insertions(+) create mode 100644 .standard-lint.yml diff --git a/.standard-lint.yml b/.standard-lint.yml new file mode 100644 index 0000000..1e8c604 --- /dev/null +++ b/.standard-lint.yml @@ -0,0 +1,31 @@ +# DO NOT EDIT +# +# This wil will be auto-updated by checkdeps to match the version in +# extraction-makeworld/configs/checkdeps/standard-lint.yml +# +# If you NEED to have custom lint rules for a paticular repository you can change the name +# of this file make your updates. Then change the lint target in the Makefile to reference your +# custom file. +# +# If we need to update this config to add new linters, get rid of deprecated linters, etc. You can just make +# the change in makeworld and then it will propogate to all repos using this file as developers run +# checkdeps --fix in those repos. + +run: + timeout: 5m +linters: + disable-all: true + enable: + - staticcheck + - unused + - gofmt + - goimports + - govet + - errcheck + - gosimple + - ineffassign + - typecheck + - gosec +linters-settings: + goimports: + local-prefixes: github.com/lindenlab diff --git a/s3proxy.go b/s3proxy.go index 281acb5..bec2cfc 100644 --- a/s3proxy.go +++ b/s3proxy.go @@ -332,6 +332,7 @@ func (p S3Proxy) writeResponseFromGetObject(w http.ResponseWriter, obj *s3.GetOb if obj.Body != nil { // io.Copy will set Content-Length w.Header().Del("Content-Length") + w.WriteHeader(http.StatusOK) _, err = io.Copy(w, obj.Body) }