RFR: 8245095: Implementation of JEP 408: Simple Web Server
jboes at openjdk.java.net
Tue Sep 14 16:00:02 UTC 2021
On Tue, 14 Sep 2021 15:42:06 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> 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
>> Hello Julia,
>> Is this an intentional change, to remove the mapping of `.zip` to `application/octet-stream`? In a later part of this patch there's a commented out test `testCommonExtensions` which deals with these extension types and that has a link to https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types which states that `.zip` should be mapped to `application/zip` instead of the current `application/octet-stream`, so I'm guessing this changed line is intentional.
>> On an unrelated note, the unix variant of this file `src/java.base/unix/classes/sun/net/www/content-types.properties` interestingly uses `.z` for `.zip`? Commit history on that file doesn't provide any hint on whether that is intentional either.
> I think you can ignore my comment above. I went and checked the `content-types.properties` in their current state for both unix and windows and they already have a separate `application/zip` which is mapped to `.zip`. So I think this above change shouldn't impact anything.
That's right, there was a duplicate entry for `.zip` in the Windows properties file only, which I removed.
I'm not sure if `.z` in the Unix properties file is intentional, but I do have a PR in progress in the same area, which I will link here shortly.
More information about the core-libs-dev