Skip to content

Commit

Permalink
GOSDK-23: The SDK breaks canonical MIME encoding of http headers. Rem…
Browse files Browse the repository at this point in the history
…oving the to lower call on all headers which was messing with the MIME encoding. (#110)
  • Loading branch information
RachelTucker authored Jul 8, 2020
1 parent 97cdb71 commit ab5d074
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ds3/models/ds3Response.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package models

import (
"io"
"strings"
"net/http"
)

Expand All @@ -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
}
Expand Down

0 comments on commit ab5d074

Please sign in to comment.