Fix S3 directory detection based on ContentType header#6992
Merged
findepi merged 1 commit intotrinodb:masterfrom Feb 24, 2021
Merged
Conversation
c1cf0db to
e2bf0db
Compare
findepi
reviewed
Feb 23, 2021
Member
There was a problem hiding this comment.
Should this perhaps be case insensitive?
or perhaps parse this using a proper utility class?
MediaType.parse(metadata.getContentType()).is(MediaType.create("application", "x-directory"))
e2bf0db to
255b1d9
Compare
Member
Author
|
I also noticed this code above my change, which seems dead, since the Is it OK that directories on S3 report a size of 32MB ( |
findepi
approved these changes
Feb 23, 2021
Member
|
cc @electrum |
nmahadevuni
added a commit
to nmahadevuni/presto
that referenced
this pull request
Apr 28, 2021
Cherry pick of trinodb/trino#6992 Co-authored-by: Michał Ślizak <michal.slizak+github@gmail.com>
rschlussel
pushed a commit
to prestodb/presto
that referenced
this pull request
Apr 28, 2021
Cherry pick of trinodb/trino#6992 Co-authored-by: Michał Ślizak <michal.slizak+github@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems S3 is now returning a charset in the Content-Type header (e.g.
application/x-directory; charset=UTF-8) for directories uploaded through S3 GUI.This breaks directory detection.