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

Move HTTP/2 illegal message header check from message converters to protocol interceptors #496

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

ok2c
Copy link
Member

@ok2c ok2c commented Oct 11, 2024

Presently HTTP/2 specific header field validation logic is backed into message converters. It makes it impossible to customize or disable. Moreover, when a HTTP/2 promise requests when get rejected as invalid due to presence of illegal headers, it cannot be correctly mapped to a handler because there is request object to start with, and as a result the error does not get correctly propagated to the caller.

This change-set corrects the problem by moving header field validation logic from message converters to the protocol processing chain, where it belongs.

This also enables us to to allow the host header in H2 promise requests when connecting to Apache HTTPD.

@ok2c
Copy link
Member Author

ok2c commented Oct 11, 2024

@arturobernalg Please review

Copy link
Member

@arturobernalg arturobernalg left a comment

Choose a reason for hiding this comment

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

LGTM

@ok2c ok2c force-pushed the h2_header_field_validation branch from 46fdb46 to f4a848b Compare October 12, 2024 09:08
@ok2c ok2c merged commit 1b0c4cc into master Oct 12, 2024
17 checks passed
@ok2c ok2c deleted the h2_header_field_validation branch October 12, 2024 09:14
@ok2c
Copy link
Member Author

ok2c commented Oct 12, 2024

Cherry-picked to 5.3.x

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