Skip to content

Add RFC 7639 canonical percent codec for ALPN protocol identifiers. - #596

Merged
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:rfc7639-percentcodec
Jan 14, 2026
Merged

arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:rfc7639-percentcodec

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Jan 12, 2026

Copy link
Copy Markdown
Member

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

@arturobernalg
arturobernalg requested a review from ok2c January 12, 2026 18:09

@ok2c ok2c left a comment

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
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
Copy Markdown
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

ok2c commented Jan 12, 2026

Copy link
Copy Markdown
Member

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

@arturobernalg

arturobernalg commented Jan 13, 2026

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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.
@arturobernalg
arturobernalg merged commit d0df4ea into apache:master Jan 14, 2026
10 checks passed
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