On Mon, 30 Jun 2025 11:28:49 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - SNI server names can now be derived from the Origin instance >> - strip the square brackets from URI's host when constructing an Origin >> - support only lower case http and https literals for scheme in Origin >> - add new line > > src/java.net.http/share/classes/jdk/internal/net/http/Origin.java line 48: > >> 46: throw new IllegalArgumentException("Invalid port"); >> 47: } >> 48: } > > Should we enforce lower case for scheme and host in this constructor? > For instance - convert to lower case if needed in `from(URI)` and > throw/assert here if not lower case? We only support `http` and `https`. So I think it makes sense to convert it to lower case and expect the scheme to be either of these. I've updated the PR accordingly. > src/java.net.http/share/classes/jdk/internal/net/http/Origin.java line 94: > >> 92: return host + ":" + port; >> 93: } >> 94: } > > Missing newline. Fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26041#discussion_r2175338532 PR Review Comment: https://git.openjdk.org/jdk/pull/26041#discussion_r2175335449