RFR: 8245095: Implementation of JEP 408: Simple Web Server [v5]
Michael McMahon
michaelm at openjdk.java.net
Tue Sep 21 16:08:39 UTC 2021
On Tue, 21 Sep 2021 14:09:54 GMT, Julia Boes <jboes at openjdk.org> wrote:
>> 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 with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>
> - Merge branch 'master' into simpleserver
> - Merge remote-tracking branch 'origin/simpleserver' into simpleserver
> - Merge branch 'master' into simpleserver
> - refactor isHidden,isReadable,isSymlink checks and cleanup tests
> - Merge branch 'master' into simpleserver
> - check isHidden, isSymlink, isReadable for all path segments
> - add checks for all path segments
> - Merge branch 'master' into componentcheck
> - Merge branch 'master' into simpleserver
> - improve output on startup
> - ... and 6 more: https://git.openjdk.java.net/jdk/compare/6d91a3eb...fe059131
test/jdk/com/sun/net/httpserver/FilterTest.java line 330:
> 328: var response = client.send(request, HttpResponse.BodyHandlers.ofString());
> 329: assertEquals(response.statusCode(), 200);
> 330: assertEquals(inspectedURI.get(), URI.create("/"));
Could you make the request URI something like /foo/bar instead of just / here?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5505
More information about the build-dev
mailing list