On Thu, 6 Feb 2025 19:23:55 GMT, Bradford Wetmore <wetm...@openjdk.org> wrote:

>> src/java.base/share/classes/javax/net/ssl/SSLParameters.java line 666:
>> 
>>> 664:      *     byte[] bytes = HUK_UN_I.getBytes(StandardCharsets.UTF_8);
>>> 665:      *
>>> 666:      *     // Preserve network byte order by using ISO_8859_1 encoding
>> 
>> I find `network byte order` wording rather confusing, everything here is 
>> big-endian, but I guess that's not what we really mean by that, we really 
>> care about encoding. I would just put `Convert to the default ALPN encoding` 
>> comment here.
>
> RFC 7301 says:
> 
>     o  Identification Sequence: The precise set of octet values that
>       identifies the protocol.  This could be the UTF-8 encoding
>       [[RFC3629](https://datatracker.ietf.org/doc/html/rfc3629)] of the 
> protocol name.
> 
> I'll change to `octet byte ordering`.

I still think that `Convert to the default ALPN encoding` comment is less 
confusing, we are just passing the string in the encoding that the library 
expects. Basically your comment assumes reader's familiarity with the RFC.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23379#discussion_r1945315387

Reply via email to