mirror of
https://github.com/apache/httpd.git
synced 2025-08-15 23:27:39 +00:00
*) mod_md: fixed a bug leading to failed transfers for OCSP
stapling information when more than 6 certificates needed updates in the same run. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900628 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -251,17 +251,18 @@ static apr_status_t internals_setup(md_http_request_t *req)
|
||||
rv = APR_EGENERAL;
|
||||
goto leave;
|
||||
}
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, req_data_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, resp_data_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
|
||||
}
|
||||
else {
|
||||
md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "reusing curl instance from http");
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, req_data_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, resp_data_cb);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
|
||||
|
||||
internals = apr_pcalloc(req->pool, sizeof(*internals));
|
||||
internals->curl = curl;
|
||||
|
||||
@ -354,6 +355,9 @@ static apr_status_t update_status(md_http_request_t *req)
|
||||
rv = curl_status(curl_easy_getinfo(internals->curl, CURLINFO_RESPONSE_CODE, &l));
|
||||
if (APR_SUCCESS == rv) {
|
||||
internals->response->status = (int)l;
|
||||
md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, req->pool,
|
||||
"req[%d]: http status is %d",
|
||||
req->id, internals->response->status);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
@ -579,19 +583,7 @@ static void md_curl_req_cleanup(md_http_request_t *req)
|
||||
md_curl_internals_t *internals = req->internals;
|
||||
if (internals) {
|
||||
if (internals->curl) {
|
||||
CURL *curl = md_http_get_impl_data(req->http);
|
||||
if (curl == internals->curl) {
|
||||
/* NOP: we have this curl at the md_http_t already */
|
||||
}
|
||||
else if (!curl) {
|
||||
/* no curl at the md_http_t yet, install this one */
|
||||
md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "register curl instance at http");
|
||||
md_http_set_impl_data(req->http, internals->curl);
|
||||
}
|
||||
else {
|
||||
/* There already is a curl at the md_http_t and it's not this one. */
|
||||
curl_easy_cleanup(internals->curl);
|
||||
}
|
||||
curl_easy_cleanup(internals->curl);
|
||||
}
|
||||
if (internals->req_hdrs) curl_slist_free_all(internals->req_hdrs);
|
||||
req->internals = NULL;
|
||||
|
@ -837,8 +837,8 @@ static apr_status_t next_todo(md_http_request_t **preq, void *baton,
|
||||
md_http_set_on_response_cb(req, ostat_on_resp, update);
|
||||
rv = APR_SUCCESS;
|
||||
md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, 0, req->pool,
|
||||
"scheduling OCSP request for %s, %d request in flight",
|
||||
ostat->md_name, in_flight);
|
||||
"scheduling OCSP request[%d] for %s, %d request in flight",
|
||||
req->id, ostat->md_name, in_flight);
|
||||
}
|
||||
}
|
||||
cleanup:
|
||||
|
@ -27,7 +27,7 @@
|
||||
* @macro
|
||||
* Version number of the md module as c string
|
||||
*/
|
||||
#define MOD_MD_VERSION "2.4.14"
|
||||
#define MOD_MD_VERSION "2.4.15"
|
||||
|
||||
/**
|
||||
* @macro
|
||||
@ -35,7 +35,7 @@
|
||||
* release. This is a 24 bit number with 8 bits for major number, 8 bits
|
||||
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
|
||||
*/
|
||||
#define MOD_MD_VERSION_NUM 0x02040e
|
||||
#define MOD_MD_VERSION_NUM 0x02040f
|
||||
|
||||
#define MD_ACME_DEF_URL "https://acme-v02.api.letsencrypt.org/directory"
|
||||
#define MD_TAILSCALE_DEF_URL "file://localhost/var/run/tailscale/tailscaled.sock"
|
||||
|
Reference in New Issue
Block a user