move s3 related constants from package http to s3_constants

This commit is contained in:
chrislu
2022-05-30 22:57:41 -07:00
parent f4a6da6cb2
commit 27732ecfa4
15 changed files with 165 additions and 170 deletions

View File

@@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
xhttp "github.com/chrislusf/seaweedfs/weed/s3api/http"
"github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"io"
"io/fs"
"mime/multipart"
@@ -254,7 +254,7 @@ func handleStaticResources2(r *mux.Router) {
func adjustPassthroughHeaders(w http.ResponseWriter, r *http.Request, filename string) {
for header, values := range r.Header {
if normalizedHeader, ok := xhttp.PassThroughHeaders[strings.ToLower(header)]; ok {
if normalizedHeader, ok := s3_constants.PassThroughHeaders[strings.ToLower(header)]; ok {
w.Header()[normalizedHeader] = values
}
}