-
-
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
why send
method automatic set Date
header?
#912
Comments
The spec says it's required. See the last sentence of the second paragraph in RFC7231#7.1.1.2:
|
RFC7231#7.1.1.2 - It'd be uncommon, but it's technically possible that hyper could be used on such a system. |
Ok. Thank you for the information. |
@smithsps it could be, so I wouldn't object to some sort of config, I suppose, but I'm left wondering if it realistically ever happens. |
@seanmonstar agreed, the only thing I could think of could be clockless embedded device that for some reason didn't have a NTP sync. |
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. Resolves the now closed issue hyperium#912.
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.
I found the code in
write_head()
:I don't want to set
Date
header. What should I do?The text was updated successfully, but these errors were encountered: