RFR: 8290149: java/nio/file/Files/probeContentType/Basic.java fails on Windows Server 2019/2022
Jaikiran Pai
jpai at openjdk.org
Wed Jul 13 11:58:05 UTC 2022
On Tue, 12 Jul 2022 06:41:35 GMT, KIRIYAMA Takuya <duke at openjdk.org> wrote:
> On Windows Server 2019/2022, default content type of ".js" is set to "text/plain" in registry.
>
>
> C:\>reg query HKEY_CLASSES_ROOT.js /v "Content Type"
>
> HKEY_CLASSES_ROOT.js
> Content Type REG_SZ text/plain
>
>
> So, "text/plain" should be added for content type of ".js".
>
> I propose to add default registry value to expected list. After fix, test passes on Windows Server 2022.
>
> Could you review this fix, please?
I couldn't reproduce this neither on a Windows 2019 nor on a Windows 2022 system.
However, the output of your command in the PR description does suggest that your system is configured to consider this "text/plain". Plus the documentation of `HKEY_CLASSES_ROOT` states that these values are per user configurable https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc739822(v=ws.10)
Based on that, I think this change is fine and trivial.
-------------
Marked as reviewed by jpai (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9459
More information about the nio-dev
mailing list