On Tue, 14 Sep 2021 12:38:19 GMT, Jim Laskey <jlas...@openjdk.org> wrote:

>> src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpHandlers.java 
>> line 128:
>> 
>>> 126:      * <p> {@code headers} are the effective headers of the response. 
>>> The
>>> 127:      * response <i>body bytes</i> are a {@code UTF-8} encoded byte 
>>> sequence of
>>> 128:      * {@code body}. The response {@linkplain 
>>> HttpExchange#sendResponseHeaders(int, long) is sent}
>> 
>> Not sure what the javadoc looks like here, but it looks like the link is "is 
>> sent". Curious.
>
> Just a rewording, maybe.

Hmm... Maye that should be "The response headers *are sent*". The non-obvious 
technical details is that the response headers are sent before the body - as 
soon as you call  `sendResponseHeaders`. The link is here to provide a better 
understanding of the workings of the new Handler. The headers are sent by 
calling `sendResponseHeaders` on the HttpExchange.

-------------

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

Reply via email to