From 2de074063d2e027f3aa1e9ecf5ad303fe367385f Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Tue, 14 Sep 2021 06:56:21 +0000 Subject: [PATCH] fix time-of-use vs time-of-check fix time-of-use time-of-check bugs Submitted by: kokke Github: closes #266 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893326 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_from_h1.c | 2 +- modules/md/md_acme.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/http2/h2_from_h1.c b/modules/http2/h2_from_h1.c index 16a549a8973..86e63286176 100644 --- a/modules/http2/h2_from_h1.c +++ b/modules/http2/h2_from_h1.c @@ -232,7 +232,7 @@ static h2_headers *create_response(h2_task *task, request_rec *r) if (r->proxyreq != PROXYREQ_RESPONSE || !apr_table_get(r->headers_out, "Date")) { char *date = apr_palloc(r->pool, APR_RFC822_DATE_LEN); - ap_recent_rfc822_date(date, r? r->request_time : apr_time_now()); + ap_recent_rfc822_date(date, r->request_time); apr_table_setn(r->headers_out, "Date", date ); } if (r->proxyreq != PROXYREQ_RESPONSE) { diff --git a/modules/md/md_acme.c b/modules/md/md_acme.c index 82e16125a4c..80a76fb63de 100644 --- a/modules/md/md_acme.c +++ b/modules/md/md_acme.c @@ -388,10 +388,10 @@ static apr_status_t md_acme_req_send(md_acme_req_t *req) if (req->req_json) { body = apr_pcalloc(req->p, sizeof(*body)); - body->data = md_json_writep(req->req_json, req->p, MD_JSON_FMT_INDENT); if (!body) { rv = APR_EINVAL; goto leave; } + body->data = md_json_writep(req->req_json, req->p, MD_JSON_FMT_INDENT); body->len = strlen(body->data); } -- 2.47.3