Just to clarify, the problem is with the Desktop application and not depending if the server is Mac, Linux or Windows, right?
Or there is a combination of problems depending on the server and windows client?
To clarify a bit more, the example server project was only run on macOS & Windows, although this issue I’ve definitely seen in production where things run on Linux.
But to be clear, this isn’t a URLConnection issue on the server side of things, but instead a client issue, so where the server runs is sort of irrelevant. On macOS URLConnection uses/respects/conforms to standard conventions in regard to cookies, but under Windows it does not.