-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(server): add an option to disable adding the DATE
header
#2751
Conversation
Add an option to disable the automatic addition of the `DATE` header for situations when an accurate time is not available or the `DATE` header is otherwise undesirable, for example communicating with a non-compliant client. According to RFC7231#7.1.1.2, 'An origin server MUST NOT send a Date header field if it does not have a clock capable of providing a reasonable approximation of the current instance in Coordinated Universal Time.' Otherwise, sending the date is required. Resolve the now closed issue hyperium#912.
Thanks for the PR! I think providing this is probably a good idea... Do you have a use case that needs this now? |
@seanmonstar i need this. when i use http proxy server (like nginx), i need not response the |
@NateLing Thank you, I was looking for this. After trying it out, the performance improved on low-end systems as expected. I added a comment to your changes, it is just an idea about the wording of the option. Let me know what you think. |
Hello, I would really like for this option to be added. Is there anything blocking this? If so maybe I can help. |
I think this just got forgotten. Looking it over, it seems like a fine addition. I think:
|
any news on this? |
This is a must have configuration. For small payloads, having vs not-having the date header can make a massive difference in performance > 100%. Would love to have this merged 🙏 |
This would also be useful when using as an HTTP Proxy. After a CONNECT request not all clients expect the Date header. |
agree |
It was a mistake to forget this. I'd merge it if someone wants to update it to current master. |
@seanmonstar will do |
@takkuumi @realtimetodie @Black-Hack @darren-fu @tusharmath @RyanAD @deatondg I have proposed a pull request which enables this functionality: #3644. If you could please leave feedback on the API and integration (any suggestions or comments)! |
I think this issue can be closed now, since #3644 is merged. Thank you @edwardwc and @seanmonstar |
Add an option to disable the automatic addition of the
DATE
header forsituations when an accurate time is not available or the
DATE
headeris otherwise undesirable, for example communicating with a non-compliant
client.
According to RFC7231#7.1.1.2, 'An origin server MUST NOT send a Date
header field if it does not have a clock capable of providing a
reasonable approximation of the current instance in Coordinated
Universal Time.' Otherwise, sending the date is required.
Resolve the now closed issue #912.