Preserve ETag case for S3 compatibility (#7498)

Most hadoop distributions hortonworks, cloudera all
depend on aws-sdk-java 1.7.x to 1.10.x - the releases
which have bugs related case sensitive check for
ETag header. Go changes the case of the headers set
to be canonical but only preserves them when set
through a direct map.

This fixes most compatibility issues we have had
in the past supporting older hadoop distributions.
This commit is contained in:
Harshavardhana
2019-04-08 16:54:46 -07:00
committed by kannappanr
parent 10a607154d
commit a2e344bf30
6 changed files with 10 additions and 9 deletions

View File

@@ -2413,7 +2413,7 @@ func uploadTestObject(t *testing.T, apiRouter http.Handler, creds auth.Credentia
rec = httptest.NewRecorder()
apiRouter.ServeHTTP(rec, req)
checkRespErr(rec, http.StatusOK)
etag := rec.Header().Get("ETag")
etag := rec.Header()["ETag"][0]
if etag == "" {
t.Fatalf("Unexpected empty etag")
}