Skip to content

Conversation

@arturobernalg
Copy link
Member

@arturobernalg arturobernalg commented Aug 22, 2025

This PR adds core support for RFC 9218: we advertise SETTINGS_NO_RFC7540_PRIORITIES=1, gate PRIORITY_UPDATE emission on the peer’s setting (or pre-SETTINGS), parse/accept PRIORITY_UPDATE frames in the base muxer, and introduce PriorityParamsParser for the Priority header (u/i members, tolerant parsing).

@arturobernalg arturobernalg requested a review from ok2c August 22, 2025 17:51
@arturobernalg arturobernalg marked this pull request as draft August 22, 2025 19:30
@arturobernalg arturobernalg marked this pull request as ready for review August 23, 2025 08:03
@ok2c
Copy link
Member

ok2c commented Aug 24, 2025

@arturobernalg Before we can do anything of this kind we must ensure conformance with RFC 9113 first.

@ok2c ok2c force-pushed the master branch 4 times, most recently from 8fb1d8e to bf7d524 Compare September 13, 2025 16:38
@ok2c
Copy link
Member

ok2c commented Sep 20, 2025

@arturobernalg This is a big change. I have no bandwidth to carefully read through RFC 9218 at the moment. What I can do to review your changes for impact on the existing code and APIs. The rest becomes your area of responsibility, if you are willing to maintain this feature. Please also consider how stable it is and whether one release cycle should be enough to stabilize it or it should be marked experimental and go though several release cycles.

@arturobernalg arturobernalg force-pushed the rfc9218 branch 4 times, most recently from a457f09 to e1d5baf Compare October 1, 2025 09:08
@arturobernalg arturobernalg changed the title HTTP/2: implement RFC 9218 core pieces. HTTP/2: implement RFC 9218 Extensible Prioritization Scheme for HTTP. Oct 1, 2025
@arturobernalg
Copy link
Member Author

@arturobernalg This is a big change. I have no bandwidth to carefully read through RFC 9218 at the moment. What I can do to review your changes for impact on the existing code and APIs. The rest becomes your area of responsibility, if you are willing to maintain this feature. Please also consider how stable it is and whether one release cycle should be enough to stabilize it or it should be marked experimental and go though several release cycles.

@ok2c ACK — I’ll can own RFC 9218: client emission gated by SETTINGS_NO_RFC7540_PRIORITIES=1, server accept-only; please review API/surface impact

return new PriorityParams(null, null);
}

final CharArrayBuffer buf = new CharArrayBuffer(headerValue.length());
Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg Please do not do that. There is no need to create a copy of the header value. The parser can work with any CharSequence. Can't you re-use MessageSupport parsing routines here?

Otherwise, looks good.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ok2c please do another pass

Copy link
Member

@ok2c ok2c left a comment

Choose a reason for hiding this comment

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

@arturobernalg This feature is now your area of responsibility.

Add PRIORITY_UPDATE (0x10) and SETTINGS_NO_RFC7540_PRIORITIES (0x9).
Client emits before HEADERS on opt-in; server accepts and applies.
Wire into multiplexer + Priority header utils + tests.
@arturobernalg
Copy link
Member Author

@arturobernalg This feature is now your area of responsibility.

@ok2c Understood. I’ll take ownership of the RFC 9218 prioritization feature and handle its maintenance going forward.

@arturobernalg arturobernalg merged commit 9f700c9 into apache:master Oct 3, 2025
10 checks passed
@ok2c
Copy link
Member

ok2c commented Oct 3, 2025

@arturobernalg Please also add RFC 9218 to the protocol support section in README.md

@arturobernalg
Copy link
Member Author

@arturobernalg Please also add RFC 9218 to the protocol support section in README.md

@ok2c done

return streams.createActive(channel, streamHandler);
}

public final void sendPriorityUpdate(final int prioritizedStreamId, final PriorityValue value) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg By the way this method does not seem to be used anywhere. Is this intended?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ok2c Yes, that was intentional. The logic was inlined into the stream submit path, so the standalone helper became redundant. I'm going to removed it.

Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg Please also remove H2RequestPriority interceptor for now. It is not being used anywhere in core and I presume your intention was to use it in client. In this case the interceptor should be in client.

Copy link
Member

@ok2c ok2c Oct 4, 2025

Choose a reason for hiding this comment

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

@arturobernalg Also PriorityFormatter is not being used anywhere in core. If they are not used in core they should not be in core. Re-submit them in client. Believe me you do not want to depend on a new release of core to be able to fix a bug in client.

Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg Please let me know if you can live with #567. The functionality should be moved to client and we should put more work into the API design

@ok2c
Copy link
Member

ok2c commented Oct 3, 2025

@arturobernalg I did a sloppy job reviewing your code. It needs more work.

@arturobernalg
Copy link
Member Author

@arturobernalg I did a sloppy job reviewing your code. It needs more work.

@ok2c Can you point out the specific areas you find lacking, so I can focus the fixes where needed? I’ll take another pass, tighten the code paths,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants