From ab5d074d6acc4cc8583e4137aa86e27f000899f9 Mon Sep 17 00:00:00 2001 From: RachelTucker Date: Wed, 8 Jul 2020 16:49:00 -0600 Subject: [PATCH] GOSDK-23: The SDK breaks canonical MIME encoding of http headers. Removing the to lower call on all headers which was messing with the MIME encoding. (#110) --- ds3/models/ds3Response.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ds3/models/ds3Response.go b/ds3/models/ds3Response.go index 0e70865..aaf2880 100644 --- a/ds3/models/ds3Response.go +++ b/ds3/models/ds3Response.go @@ -2,7 +2,6 @@ package models import ( "io" - "strings" "net/http" ) @@ -29,13 +28,10 @@ func (wrappedHttpResponse *WrappedHttpResponse) Body() io.ReadCloser { } func (wrappedHttpResponse *WrappedHttpResponse) Header() *http.Header { - // The HTTP spec says headers keys are case insensitive, so we'll just - // to lower them before processing the response so we can always get the - // right thing. result := make(http.Header) header := wrappedHttpResponse.rawResponse.Header for k, v := range header { - result[strings.ToLower(k)] = v + result[k] = v } return &result }