Skip to content

Conversation

@arturobernalg
Copy link
Member

@arturobernalg arturobernalg commented Jan 12, 2026

Introduce PercentCodec.RFC7639 for canonical ALPN protocol-id encoding per RFC 7639.

@arturobernalg arturobernalg requested a review from ok2c January 12, 2026 18:09
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.

and guarantees uppercase hex

@arturobernalg I do not see any changes in the behavior of the codec to that effect but so be it.


private final BitSet unreserved;

private PercentCodec(final BitSet unreserved) {
Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg Let's make the constructor public and mark it @Internal

Copy link
Member Author

Choose a reason for hiding this comment

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

@arturobernalg Let's make the constructor public and mark it @Internal

Done

@ok2c
Copy link
Member

ok2c commented Jan 12, 2026

@arturobernalg Could there be a better name than RFC7639 ? RFC7639 looks completely unrelated to the codec.

@arturobernalg
Copy link
Member Author

arturobernalg commented Jan 13, 2026

Could there be a better name than RFC7639 ? RFC7639 looks completely unrelated to the codec.

@arturobernalg Could there be a better name than RFC7639 ? RFC7639 looks completely unrelated to the codec.

Done . @ok2c please let me know if then name now its more significant


public static final PercentCodec RFC3986 = new PercentCodec(UNRESERVED);
public static final PercentCodec RFC5987 = new PercentCodec(RFC5987_UNRESERVED);
public static final PercentCodec RFC7230_TOKEN = new PercentCodec(RFC7639_UNRESERVED);
Copy link
Member

Choose a reason for hiding this comment

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

@arturobernalg Could we also rename RFC7639_UNRESERVED the same way?

RFC7230 has already been superseded by RFC911x. Would not HTTP_TOKEN be better?

Preserve token tchar octets (except '%') and enforce uppercase hex.
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