[
https://issues.apache.org/jira/browse/MNG-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17172432#comment-17172432
]
Christopher Beckey commented on MNG-6975:
-----------------------------------------
Specifically this came from needing AWS to retain the correct content-type when
deploying the project site. We have our project site in S3, behind a CloudFront
Distribution (to provide security). If the content-type is not specified when
deploying the site then CloudFront defaults it to application.octet-stream, the
result is that every file on the site is downloaded rather than displayed when
accessed in a browser.
I have the code just about complete, a PR will be available in a few minutes.
The PR includes conditionals such that:
# the content-type is not overridden if it has been set
# the content-type is written only when a system property
(maven.wagon.http.file.autocontenttype) is set, the default behavior is
consistent with current behavior
# the content-type is only written if it was determinable (not null or empty)
from the javax.activation.MimetypesFileTypeMap instance
> Wagon-HTTP, set content-type when determinable from file extension
> ------------------------------------------------------------------
>
> Key: MNG-6975
> URL: https://issues.apache.org/jira/browse/MNG-6975
> Project: Maven
> Issue Type: Improvement
> Components: Plugins and Lifecycle
> Affects Versions: 3.6.3
> Reporter: Christopher Beckey
> Priority: Minor
> Labels: pull-request-available
>
> Add determination of content type from file extension when sending from File,
> using javax.activation.MimetypesFileTypeMap.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)