aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsteve.wei <coderushing@gmail.com>2024-11-27 00:35:41 +0800
committerGitHub <noreply@github.com>2024-11-26 08:35:41 -0800
commit88fa64a01ae7ac8782e70dd29a8a9f6bf44a7e19 (patch)
treeb94356d493256dabeb642c66443bb9fd2e986eee
parente2e97db917641769b5ddf6c311c406ec63463a10 (diff)
downloadseaweedfs-88fa64a01ae7ac8782e70dd29a8a9f6bf44a7e19.tar.xz
seaweedfs-88fa64a01ae7ac8782e70dd29a8a9f6bf44a7e19.zip
change comment for expect header (#6289)
* remove case of expect * Set the default value of the Expect header for compatibility.
-rw-r--r--weed/s3api/auth_signature_v4.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.go
index 9cc3e2766..2aa5a9e01 100644
--- a/weed/s3api/auth_signature_v4.go
+++ b/weed/s3api/auth_signature_v4.go
@@ -666,9 +666,10 @@ func extractSignedHeaders(signedHeaders []string, r *http.Request) (http.Header,
}
switch header {
case "expect":
- // Golang http server strips off 'Expect' header, if the
- // client sent this as part of signed headers we need to
- // handle otherwise we would see a signature mismatch.
+ // Set the default value of the Expect header for compatibility.
+ //
+ // In NGINX v1.1, the Expect header is removed when handling 100-continue requests.
+ //
// `aws-cli` sets this as part of signed headers.
//
// According to
@@ -680,8 +681,6 @@ func extractSignedHeaders(signedHeaders []string, r *http.Request) (http.Header,
//
// So it safe to assume that '100-continue' is what would
// be sent, for the time being keep this work around.
- // Adding a *TODO* to remove this later when Golang server
- // doesn't filter out the 'Expect' header.
extractedSignedHeaders.Set(header, "100-continue")
case "host":
// Go http server removes "host" from Request.Header