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

Customization of whether server date headers are sent #3644

Merged
merged 6 commits into from
Apr 29, 2024

Conversation

edwardwc
Copy link
Contributor

Initially starting with issue #912 then followed up with pull request #2751, this pull request addresses the need for customizing whether the server sends the date header for http/2 and http/1.1.

According to RFC7231#7.1.1.2, it is not always preferable to send the date header if the system may not have access to time or may not be accurate. Additionally, disabling the date header will result in slight performance gains.

This pull request aims to allow users to customize when building the http1 or http2 service whether the date headers should be sent in responses, with a similar API to other boolean options. It also integrates tests for both http1 and 2 to prevent regression.

If you have suggestions, questions, comments, please comment on this pull request! I will promptly make changes.

Have an incredible rest of your day.

@edwardwc
Copy link
Contributor Author

@seanmonstar auto_date_header does make more sense!

@seanmonstar seanmonstar merged commit 721785e into hyperium:master Apr 29, 2024
21 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.

3 participants