Closed qusc closed 1 year ago
@swift-server-bot test this please
@swift-server-bot test this please
Locally your test crashes for me:
Test Case '-[NIOHTTP2Tests.HTTP2StreamMultiplexerTests testMultiplexerFiresInitialFramesInCorrectOrder]' started.
NIOCore/NIOAny.swift:200: Fatal error: tried to decode as type HTTP2Frame but found FramePayload with contents other(NIOHTTP2.HTTP2Frame.FramePayload.headers(NIOHTTP2.HTTP2Frame.FramePayload.Headers(headers: [], priorityData: nil, endStream: false, _paddingBytes: nil)))
Locally your test crashes for me:
Test Case '-[NIOHTTP2Tests.HTTP2StreamMultiplexerTests testMultiplexerFiresInitialFramesInCorrectOrder]' started. NIOCore/NIOAny.swift:200: Fatal error: tried to decode as type HTTP2Frame but found FramePayload with contents other(NIOHTTP2.HTTP2Frame.FramePayload.headers(NIOHTTP2.HTTP2Frame.FramePayload.Headers(headers: [], priorityData: nil, endStream: false, _paddingBytes: nil)))
@Lukasa looking into this...
@Lukasa Apparently caused by the switch to the non-deprecated init
of HTTP2StreamMultiplexer
. That implicitly switches the elements being sent down the pipeline to HTTP2Frame.Payload
to exclude the stream id? But the InboundOut
type of HTTP2StreamMultiplexer
is technically still HTTP2Frame
?
Edit: this is about the type of elements fired on the child channel, I see...
@swift-server-bot test this please if I'm allowed to trigger that
@swift-server-bot add to allowlist
Motivation:
Make sure the order of
HTTP2Frame
s that are fired through the pipeline of aHTTP2StreamChannel
byHTTP2CommonInboundStreamMultiplexer
is correct when aread()
call on the parent channel synchronously causes further frames to be processed.Modifications:
Reorder calls in
HTTP2CommonInboundStreamMultiplexer.receivedFrame(frame:context:multiplexer)
so that initial header frame is buffered and processed first.Result:
Resolves #410 and makes newly added test case
HTTP2StreamMultiplexerTests.testMultiplexerFiresInitialFramesInCorrectOrder()
pass.