Hi,
I am using vert.x client and I have an issue while using it with an h2c header and a flowable of Buffer. Here an extract of my code :
My client is created with those options :
options
.setProtocolVersion(HttpVersion.HTTP_2)
.setHttp2ClearTextUpgrade(httpOptions.isClearTextUpgrade());
And I am making the request to send a Flowable of Buffer like this :
HttpClient httpClient = vertx.createHttpClient(options)
return httpClient
.rxRequest(options)
.flatMap(httpClientRequest -> {
return httpClientRequest.rxSend(request.chunks());
});
where
request.chunks() is just a flowable of buffer. Nothing fancy.
I got an exception
io.vertx.core.http.StreamResetException: Stream reset: 8.
Not sure if it is related to the fact that rxSend(), call send(ReadStream), that force setChunked to true. setChunked contains a check regarding the protocol version but only on HTTP1.0 not HTTP2 and chunked should be set for http/2.
// HTTP 1.0 does not support chunking so we ignore this if HTTP 1.0
if (client.options().getProtocolVersion() != io.vertx.core.http.HttpVersion.HTTP_1_0) {
this.chunked = chunked;
}
To isolate the issue to send(ReadStream), I have tested just by sending a Buffer or a String and the connection is well upgraded from HTTP1.1 to HTTP2 without issue.
Thanks
Guillaume