Compare commits

...

2 Commits

Author SHA1 Message Date
Ciro Spaciari
09b75b2d05 Merge branch 'main' into nektro-patch-32137 2025-01-06 13:05:22 -08:00
Meghan Denny
8be47c93c3 fix assertion in h2_frame_parser for StreamPriority 2025-01-04 00:23:18 -08:00

View File

@@ -2660,7 +2660,7 @@ pub const H2FrameParser = struct {
var priority: StreamPriority = .{
.streamIdentifier = stream_identifier.toUInt32(),
.weight = @truncate(stream.weight),
.weight = @truncate(stream.weight - 1),
};
var frame: FrameHeader = .{
.type = @intFromEnum(FrameType.HTTP_FRAME_PRIORITY),
@@ -3520,7 +3520,7 @@ pub const H2FrameParser = struct {
var priority: StreamPriority = .{
.streamIdentifier = stream_identifier.toUInt32(),
.weight = @intCast(weight),
.weight = @intCast(weight - 1),
};
_ = priority.write(@TypeOf(writer), writer);