Write Date header in all responses

This commit is contained in:
Alex Hultman
2022-10-16 12:37:21 +02:00
parent 4b80e77c83
commit bcf5034e3c
3 changed files with 38 additions and 2 deletions
+3
View File
@@ -73,6 +73,9 @@ private:
/* Called only once per request */
void writeMark() {
/* Date is always written */
writeHeader("Date", std::string_view(((LoopData *) us_loop_ext(us_socket_context_loop(SSL, (us_socket_context(SSL, (us_socket_t *) this)))))->date, 29));
/* You can disable this altogether */
#ifndef UWS_HTTPRESPONSE_NO_WRITEMARK
if (!Super::getLoopData()->noMark) {