<div dir="auto">I see, thanks for looking into it.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Nov 7, 2025, 6:56 AM Daniel Fuchs <<a href="mailto:daniel.fuchs@oracle.com">daniel.fuchs@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Josiah,<br>
<br>
On 07/11/2025 09:46, Daniel Fuchs wrote:<br>
> Does the server supports https? Because if the server does not<br>
> support https it might just be trying to read the request line<br>
> before responding, and the client might be waiting for the server<br>
> hello. The same would happen with HTTP/1.1 if you tried to use<br>
> https with a server that only supports http.<br>
<br>
So that seems to be the issue.<br>
I had a look at your script - and I believe that if<br>
you had used HttpsServer.create() instead of HttpServer.create()<br>
you would have got the exception as expected.<br>
<br>
I am not sure there's much we can do there. If you try to send<br>
an HTTP/1.1 https:// request to that server youn will observe<br>
the same behavior.<br>
<br>
Specifically try this:<br>
<br>
```<br>
// http1 server on tcp 8080<br>
// btw what if we made a conveniece method? I'll contribute it <br>
myself, just say the word<br>
var http1 = HttpServer.create(new InetSocketAddress(8080), 0);<br>
http1.createContext("/", ctx -> ctx.sendResponseHeaders(101, -1));<br>
http1.start();<br>
<br>
var client = HttpClient.newBuilder()<br>
.version(HttpClient.Version.HTTP_1_1)<br>
.build();<br>
var request = HttpRequest.newBuilder()<br>
.uri(URI.create("<a href="https://localhost:8080/" rel="noreferrer noreferrer" target="_blank">https://localhost:8080/</a>"))<br>
.build();<br>
System.out.println("req: " + request);<br>
var resp = client.send(request, HttpResponse.BodyHandlers.ofString());<br>
System.out.println("resp: " + resp);<br>
```<br>
<br>
This has the same behaviour and does not involve HTTP/3.<br>
To see the exception, add this to the request in your<br>
original script:<br>
<br>
```<br>
import java.net.http.HttpOption;<br>
import static java.net.http.HttpOption.H3_DISCOVERY;<br>
import static java.net.http.HttpOption.Http3DiscoveryMode.HTTP_3_URI_ONLY;<br>
<br>
...<br>
<br>
HttpRequest.newBuilder().uri(URI.create("<a href="https://localhost:8080" rel="noreferrer noreferrer" target="_blank">https://localhost:8080</a>"))<br>
.setOption(H3_DISCOVERY, HTTP_3_URI_ONLY) <<<<< HTTP/3 only<br>
.GET().build(),<br>
```<br>
<br>
this will prevent the client from falling back to TCP.<br>
<br>
best regards,<br>
<br>
-- daniel<br>
<br>
</blockquote></div>