Skip to content

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
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