[
https://issues.apache.org/jira/browse/WAGON-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955395#comment-17955395
]
ASF GitHub Bot commented on WAGON-599:
--------------------------------------
elharo commented on code in PR #72:
URL: https://github.com/apache/maven-wagon/pull/72#discussion_r578455690
##########
wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java:
##########
@@ -279,6 +332,20 @@ public boolean isStreaming()
private static final boolean SSL_ALLOW_ALL =
Boolean.valueOf( System.getProperty( "maven.wagon.http.ssl.allowall",
"false" ) );
+ /**
+ * If enabled, then the content-type HTTP header will be set using the
file extension
+ * or the stream header to determine the type, <b>disabled by default</b>
+ */
+ private static final boolean AUTOSET_CONTENT_TYPE =
+ Boolean.valueOf( System.getProperty(
"maven.wagon.http.autocontenttype", "true" ) );
Review Comment:
A lot of Maven code is 10+ years old and dates back to Java 1.4 and earlier.
It can be quite crufty, and consistency alone is not a strong argument in this
context. The things we really care about are written down in the docs.
Everything else should assume best current practices for Java 1.7.
> Wagon-HTTP, set content-type when determinable from file extension
> ------------------------------------------------------------------
>
> Key: WAGON-599
> URL: https://issues.apache.org/jira/browse/WAGON-599
> Project: Maven Wagon
> Issue Type: Improvement
> Components: wagon-http
> Affects Versions: 3.4.1
> 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.20.10#820010)