h2spec icon indicating copy to clipboard operation
h2spec copied to clipboard

Skipping harmless frames

Open kazu-yamamoto opened this issue 3 years ago • 3 comments

Some test cases expect FRAME A but receive harmless frames such as WINDOW_UPDATE or PUSH_PROMISE, they fail:

  6. Frame Definitions
    6.1. DATA
      × 3: Sends a DATA frame with invalid pad length
        -> The endpoint MUST treat this as a connection error of type PROTOCOL_ERROR.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: WINDOW_UPDATE Frame (length:4, flags:0x00, stream_id:0)

kazu-yamamoto avatar Jun 24 '22 01:06 kazu-yamamoto

Thank you for the report!

In this case, h2spec expects a GOAWAY frame to be received or the connection to be terminated, but your implementation does not seem to have sent a GOAWAY frame or terminated the connection. WINDOW_UPDATE Frame indicates the last frame sent.

Could you please make sure that your implementation is as intended? If your implementation is reasonable, please give me the results with the -v option.

summerwind avatar Jun 25 '22 13:06 summerwind

I will double-check. But this test case sometime passes. So, a race exists. I guess that h2spec does not ignore WINDOWS_UPDATE and not wait for GOAWAY after that.

kazu-yamamoto avatar Jun 26 '22 00:06 kazu-yamamoto

I guess that h2spec does not ignore WINDOWS_UPDATE and not wait for GOAWAY after that.

I know that if h2spec receives nothing, it will timeout, and IIUC, what @summerwind is saying here is that h2spec does wait after the WINDOW_UPDATE was received, but timed out before seeing a GOAWAY or RST_STREAM.

And in that case, it reports the last frame type received, which is a bit misleading in this particular case.

KingMob avatar Sep 21 '23 10:09 KingMob