Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not set empty content-encoding #909

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

kannappanr
Copy link
Contributor

@kannappanr kannappanr commented Apr 18, 2020

Recent versions of the SDK sets Content-Encoding to empty string when a PutObject call is made. This PR sets Content-Encoding header only if it is not null or empty.

@harshavardhana harshavardhana changed the title Fix: Do not set empty content-encoding fix: do not set empty content-encoding Apr 18, 2020
@@ -970,7 +971,7 @@ private Request createRequest(
}
}

if (contentEncoding != null) {
if (!Strings.isNullOrEmpty(contentEncoding)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also filter out standard headers with empty value in normalizeHeaders()

Copy link
Contributor

@sinhaashish sinhaashish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested & LGTM

@kannappanr kannappanr merged commit 62f58a1 into minio:master Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants