summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2021-09-14 08:56:21 +0200
committerRuediger Pluem <rpluem@apache.org>2021-09-14 08:56:21 +0200
commit2de074063d2e027f3aa1e9ecf5ad303fe367385f (patch)
tree5ef7b95919420da897aa04d6ae7ec2760d16db19
parent * adding tests to verfiy header field name length checks (diff)
downloadapache2-2de074063d2e027f3aa1e9ecf5ad303fe367385f.tar.xz
apache2-2de074063d2e027f3aa1e9ecf5ad303fe367385f.zip
fix time-of-use vs time-of-check
fix time-of-use time-of-check bugs Submitted by: kokke <spam@rowdy.dk> Github: closes #266 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893326 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/http2/h2_from_h1.c2
-rw-r--r--modules/md/md_acme.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/http2/h2_from_h1.c b/modules/http2/h2_from_h1.c
index 16a549a897..86e6328617 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 82e16125a4..80a76fb63d 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);
}