Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Http 2 header validation #5072

Open
franz1981 opened this issue Jan 17, 2024 · 0 comments
Open

Optimize Http 2 header validation #5072

franz1981 opened this issue Jan 17, 2024 · 0 comments
Milestone

Comments

@franz1981
Copy link
Contributor

While inspecting few benchmark this behaviour popup in the HTTP 2 server response handling:
image

It shows that we do perform few validations around header names, which could be improved or merged (if proves to be beneficial, in the common case things are right).

The existing process work like this;

for header names:

for header values:

Additionally, related header names, the RFC report at https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2

Just as in HTTP/1.x, header field names are strings of ASCII
characters that are compared in a case-insensitive fashion. However,
header field names MUST be converted to lowercase prior to their
encoding in HTTP/2. A request or response containing uppercase
header field names MUST be treated as malformed

which means that the vertx validation against control character is just too much, and could be dropped.

Re header values, instead, it seems that the validation should follow https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 (which I have yet to interpret).

@vietj vietj added this to the 4.5.2 milestone Jan 17, 2024
@vietj vietj modified the milestones: 4.5.2, 4.5.3 Jan 30, 2024
@vietj vietj modified the milestones: 4.5.3, 4.5.4 Feb 6, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 22, 2024
@vietj vietj modified the milestones: 4.5.5, 4.5.6 Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants