On Tue, 14 Sep 2021 09:46:21 GMT, Julia Boes <jb...@openjdk.org> wrote:
> This change adds some common types to the content-type.properties files, > notably .js, .css, and .jar, as well as some others. > > The duplicated entry for .zip is removed from the Windows properties file. src/java.base/unix/classes/sun/net/www/content-types.properties line 266: > 264: > 265: text/javascript: \ > 266: description=Javascript File;\ JavaScript src/java.base/unix/classes/sun/net/www/content-types.properties line 323: > 321: file_extensions=.xml > 322: > 323: application/rtf: \ I'd also add an entry for `text/markdown` src/java.base/unix/classes/sun/net/www/content-types.properties line 324: > 322: > 323: application/rtf: \ > 324: description=Wordpad Document;\ WordPad src/java.base/unix/classes/sun/net/www/content-types.properties line 326: > 324: description=Wordpad Document;\ > 325: file_extensions=.rtf; > 326: Maybe add entries for the equivalent OpenDocument formats as well? src/java.base/unix/classes/sun/net/www/content-types.properties line 327: > 325: file_extensions=.rtf; > 326: > 327: application/xls: \ application/vnd.ms-excel src/java.base/unix/classes/sun/net/www/content-types.properties line 328: > 326: > 327: application/xls: \ > 328: description=XLS File;\ I'd describe the Office formats as "Microsoft Word/Excel/PowerPoint" src/java.base/unix/classes/sun/net/www/content-types.properties line 331: > 329: file_extensions=.xls; > 330: > 331: application/xlsx: \ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet src/java.base/unix/classes/sun/net/www/content-types.properties line 339: > 337: file_extensions=.csv; > 338: > 339: application/pptx: \ application/vnd.openxmlformats-officedocument.presentationml.presentation src/java.base/unix/classes/sun/net/www/content-types.properties line 343: > 341: file_extensions=.pptx; > 342: > 343: application/ppt: \ application/vnd.ms-powerpoint src/java.base/unix/classes/sun/net/www/content-types.properties line 347: > 345: file_extensions=.ppt; > 346: > 347: application/7z: \ application/x-7z-compressed src/java.base/unix/classes/sun/net/www/content-types.properties line 348: > 346: > 347: application/7z: \ > 348: description=7z File;\ 7-Zip File src/java.base/unix/classes/sun/net/www/content-types.properties line 351: > 349: file_extensions=.7z; > 350: > 351: application/doc: \ application/msword src/java.base/unix/classes/sun/net/www/content-types.properties line 355: > 353: file_extensions=.doc; > 354: > 355: application/docx: \ application/vnd.openxmlformats-officedocument.wordprocessingml.document src/java.base/unix/classes/sun/net/www/content-types.properties line 359: > 357: file_extensions=.docx; > 358: > 359: application/php: \ Since e.g. `.java` and `.pl` are already listed as file extensions under `text/plain`, I'd add `.php` there, and add `.adoc` (AsciiDoc), `.ts` (TypeScript) and `.py` (Python) as well. src/java.base/unix/classes/sun/net/www/content-types.properties line 363: > 361: file_extensions=.php; > 362: > 363: application/rar: \ application/vnd.rar src/java.base/windows/classes/sun/net/www/content-types.properties line 30: > 28: application/octet-stream: \ > 29: description=Generic Binary Stream;\ > 30: file_extensions=.saveme,.dump,.hqx,.arc,.obj,.lib,.bin,.exe,.gz `.gz` has a registered media type and should be a separate entry ------------- PR: https://git.openjdk.java.net/jdk/pull/5506