RFR: 8245095: Implementation of JEP 408: Simple Web Server [v2]

Michael McMahon michaelm at openjdk.java.net
Wed Sep 15 15:37:27 UTC 2021

On Wed, 15 Sep 2021 08:42:40 GMT, Julia Boes <jboes at openjdk.org> wrote:

>> src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsServer.java line 152:
>>> 150:         return server;
>>> 151:     }
>>> 152: 
>> Too bad we couldn't simplify the setting up a basic certificate for https.
> That would be nice indeed, but the goal of this JEP is a minimal HTTP-only server, intentionally leaving anything HTTPS aside. `HttpsServer::create` being the exception, added to provide the same convenience as for `HttpServer`. Any HTTPS configuration can be done using the existing API.

I agree the JEP should focus on a minimal HTTP server and the new API does allow an HTTPS based file server to be setup in one or two lines of code. I don't think there would be much value in providing something like self signed certificates, but it has become a lot easier to obtain real https certificates through services like LetsEncrypt so it might be interesting to write an article for inside.java showing how to set up a HTTPS server from start to finish.


PR: https://git.openjdk.java.net/jdk/pull/5505

More information about the core-libs-dev mailing list