GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Generic writeFrame can emit frames over SETTINGS_MAX_FRAME_SIZE · Issue #17426 · netty/netty Closed DescriptionIssueRFC 9113 applies StandardCode
/** Generic write method for any HTTP/2 frame. This allows writing of non-standard frames. */ ChannelFuture writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload, ChannelPromise promise);
Integer maxFrameSize = settings.maxFrameSize(); if (maxFrameSize != null) { outboundFrameSizePolicy.maxFrameSize(maxFrameSize); }
public void maxFrameSize(int max) throws Http2Exception { if (!isMaxFrameSizeValid(max)) { throw connectionError(FRAME_SIZE_ERROR, "Invalid MAX_FRAME_SIZE specified in sent settings: %d", max); } maxFrameSize = max; }
int remainingData = data.readableBytes(); ... if (remainingData > maxFrameSize) { frameHeader = ctx.alloc().buffer(FRAME_HEADER_LENGTH); writeFrameHeaderInternal(frameHeader, maxFrameSize, DATA, flags, streamId); ... ctx.write(data.readRetainedSlice(maxFrameSize), promiseAggregator.newPromise()); }
public ChannelFuture writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload, ChannelPromise promise) { ... writeFrameHeaderInternal(buf, payload.readableBytes(), frameType, flags, streamId); ctx.write(buf, promiseAggregator.newPromise()); ... ctx.write(payload, promiseAggregator.newPromise()); }
return frameWriter.writeFrame(ctx, frameType, streamId, flags, payload, promise); Runtime evidenceThe focused test configured the outbound maximum frame payload to 16,384 bytes and supplied a 16,385-byte payload to the dedicated DATA writer and the generic frame writer. It inspected the emitted payload lengths: DATA was split into 16,384 and 1 bytes, while the generic path emitted a single 16,385-byte frame. Both observation-based assertions passed. Probe: Command rerun: Observed behavior:
Maven result: Impact and fixCode that uses the generic HTTP/2 writer for extension or non-standard frames can send a frame larger than the peer limit. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |