Skip to content

Commit

Permalink
Fix handling of HTTP/2 H2 empty frames in Resteasy Reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroigor committed Oct 20, 2023
1 parent d167d19 commit ac01be4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.http.HttpVersion;
import io.vertx.core.net.impl.ConnectionBase;
import io.vertx.ext.web.RoutingContext;

Expand Down Expand Up @@ -271,6 +272,14 @@ protected ByteBuf readBlocking() throws IOException {
@Override
public void handle(Buffer event) {
synchronized (request.connection()) {
if (event.length() == 0 && request.version() == HttpVersion.HTTP_2) {
// When using HTTP/2 H2, this indicates that we won't receive anymore data.
eof = true;
if (waiting) {
request.connection().notifyAll();
}
return;
}
if (input1 == null) {
input1 = event;
} else {
Expand Down

0 comments on commit ac01be4

Please sign in to comment.