http1: don't automatically send the date: header
@@ -601,19 +601,16 @@ static size_t flatten_headers_estimate_size(h2o_req_t *req, size_t server_name_a
static size_t flatten_headers(char *buf, h2o_req_t *req, const char *connection)
{
h2o_context_t *ctx = req->conn->ctx;
- h2o_timestamp_t ts;
char *dst = buf;
- h2o_get_timestamp(ctx, &req->pool, &ts);
-
assert(req->res.status <= 999);
/* send essential headers with the first chars uppercased for max. interoperability (#72) */
if (req->res.content_length != SIZE_MAX) {
- dst += sprintf(dst, "HTTP/1.1 %d %s\r\nDate: %s\r\nConnection: %s\r\nContent-Length: %zu\r\n", req->res.status,
- req->res.reason, ts.str->rfc1123, connection, req->res.content_length);
+ dst += sprintf(dst, "HTTP/1.1 %d %s\r\nConnection: %s\r\nContent-Length: %zu\r\n", req->res.status,
+ req->res.reason, connection, req->res.content_length);
} else {
- dst += sprintf(dst, "HTTP/1.1 %d %s\r\nDate: %s\r\nConnection: %s\r\n", req->res.status, req->res.reason, ts.str->rfc1123,
+ dst += sprintf(dst, "HTTP/1.1 %d %s\r\nConnection: %s\r\n", req->res.status, req->res.reason,
connection);
}
if (ctx->globalconf->server_name.len) {
