Skip to content
Permalink
Browse files
8254802: ThrowingPushPromisesAsStringCustom.java fails in "try throwi…
…ng in GET_BODY"

Backport-of: 566d77a
  • Loading branch information
GoeLin committed Oct 6, 2021
1 parent 620726e commit 7f5569cde36cd84894863d22e9b4901708749fae
Showing 1 changed file with 20 additions and 0 deletions.
@@ -726,6 +726,8 @@ void readLoop() {
}
//System.err.printf("TestServer: received frame %s\n", frame);
int stream = frame.streamid();
int next = nextstream;
int nextPush = nextPushStreamId;
if (stream == 0) {
if (frame.type() == WindowUpdateFrame.TYPE) {
WindowUpdateFrame wup = (WindowUpdateFrame) frame;
@@ -773,6 +775,16 @@ void readLoop() {
// but the continuation, even after a reset
// should be handle gracefully by the client
// anyway.
} else if (isClientStreamId(stream) && stream < next) {
// We may receive a reset on a client stream that has already
// been closed. Just ignore it.
System.err.println("TestServer: received ResetFrame on closed stream: " + stream);
System.err.println(frame);
} else if (isServerStreamId(stream) && stream < nextPush) {
// We may receive a reset on a push stream that has already
// been closed. Just ignore it.
System.err.println("TestServer: received ResetFrame on closed push stream: " + stream);
System.err.println(frame);
} else {
System.err.println("TestServer: Unexpected frame on: " + stream);
System.err.println(frame);
@@ -793,6 +805,14 @@ void readLoop() {
}
}

static boolean isClientStreamId(int streamid) {
return (streamid & 0x01) == 0x01;
}

static boolean isServerStreamId(int streamid) {
return (streamid & 0x01) == 0x00;
}

/** Encodes an group of headers, without any ordering guarantees. */
List<ByteBuffer> encodeHeaders(HttpHeaders headers) {
List<ByteBuffer> buffers = new LinkedList<>();

1 comment on commit 7f5569c

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 7f5569c Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.