Skip to content

Commit

Permalink
2.4.15rc4: improve error message in case of curl timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Nov 8, 2023
1 parent 0f2389b commit 2878ef4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
11/08/2023
- improve error message in case of curl timeouts
- bump to 2.4.15rc4

11/02/2023
- apply ISO-8859-1 ("latin1") as default encoding mechanism for claim values passed in headers and environment
variables to comply with https://www.rfc-editor.org/rfc/rfc5987; see #957; use "OIDCPassClaimsAs <any> none"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([mod_auth_openidc],[2.4.15rc3],[hans.zandbelt@openidc.com])
AC_INIT([mod_auth_openidc],[2.4.15rc4],[hans.zandbelt@openidc.com])

AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())

Expand Down
12 changes: 8 additions & 4 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,12 +1228,16 @@ static apr_byte_t oidc_util_http_call(request_rec *r, const char *url,
rv = TRUE;
break;
}
if (res == CURLE_OPERATION_TIMEDOUT) {
/* in case of a request/transfer timeout (which includes the connect timeout) we'll not retry */
oidc_error(r,
"curl_easy_perform failed with a timeout for %s: [%s]; won't retry",
url, curlError[0] ? curlError : "<n/a>");
break;
}
oidc_error(r, "curl_easy_perform(%d/%d) failed for %s with: [%s]",
i + 1, http_timeout->retries + 1, url,
curlError[0] ? curlError : "<n/a>");
/* in case of a request/transfer timeout (which includes the connect timeout) we'll not retry */
if (res == CURLE_OPERATION_TIMEDOUT)
break;
/* in case of a connectivity/network glitch we'll back off before retrying */
if (i < http_timeout->retries)
apr_sleep(http_timeout->retry_interval);
Expand All @@ -1249,7 +1253,7 @@ static apr_byte_t oidc_util_http_call(request_rec *r, const char *url,
/* set and log the response */
oidc_debug(r, "response=%s", *response ? *response : "");

end:
end:

/* cleanup and return the result */
if (h_list != NULL)
Expand Down

0 comments on commit 2878ef4

Please sign in to comment.