Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the right content-type for a Java jar file?

I'm uploading some jars into s3 and want to set the right content-type headers for them.

I looked through what I thought was a comprehensive list, and was unable to find any mention of jar.

like image 320
dlamblin Avatar asked Jun 10 '17 02:06

dlamblin


3 Answers

I found a list which might be very useful to some.

You can find a more complete (but still incomplete) list of MIME-Types here from the official Mozilla Developers Network.

For Java Archive (JAR) .jar files the correct type is indeed:

.jar   |   application/java-archive
like image 82
Bouramas Avatar answered Nov 20 '22 22:11

Bouramas


I have seen instances of these content-type headers for JAR files:

application/java-archive

application/x-java-archive

application/x-jar

like image 31
vic-nik Avatar answered Nov 20 '22 22:11

vic-nik


Oh, wikipedia says it's application/java-archive though I don't see that in any rfc or standards document.

like image 39
dlamblin Avatar answered Nov 20 '22 23:11

dlamblin