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

2021-09-15 Thread Michael McMahon
On Wed, 15 Sep 2021 08:42:40 GMT, Julia Boes  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


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

2021-09-15 Thread Julia Boes
On Wed, 15 Sep 2021 03:14:04 GMT, Jaikiran Pai  wrote:

>> FWIW `.z` is the extension of the old Unix `compress` program.
>
>> FWIW `.z` is the extension of the old Unix `compress` program.
> 
> Thank you Florent, I wasn't aware of that.

related PR for reference: https://github.com/openjdk/jdk/pull/5506

-

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


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

2021-09-15 Thread Julia Boes
> This change implements a simple web server that can be run on the 
> command-line with `java -m jdk.httpserver`.
> 
> This is facilitated by adding an entry point for the `jdk.httpserver` module, 
> an implementation class whose main method is run when the above command is 
> executed. This is the first such module entry point in the JDK.
> 
> The server is a minimal HTTP server that serves the static files of a given 
> directory, similar to existing alternatives on other platforms and convenient 
> for testing, development, and debugging.
> 
> Additionally, a small API is introduced for programmatic creation and 
> customization.
> 
> Testing: tier1-3.

Julia Boes has updated the pull request incrementally with three additional 
commits since the last revision:

 - small spec rewording
 - add module main class to symbolgenerator
 - remove UnmodifiableHeaders constant

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5505/files
  - new: https://git.openjdk.java.net/jdk/pull/5505/files/093263d0..f53c59d9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5505&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5505&range=00-01

  Stats: 32 lines in 3 files changed: 25 ins; 2 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5505.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5505/head:pull/5505

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