Skip to content

Commit

Permalink
2.4.15rc5: add version info to User-Agent header in outgoing requests
Browse files Browse the repository at this point in the history
include mod_auth_openidc, libcurl and OpenSSL version information and
log it for debugging purposes

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Nov 22, 2023
1 parent 2878ef4 commit e8d5adc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
11/22/2023
- populate User-Agent header in outgoing HTTP requests with mod_auth_openidc, libcurl and OpenSSL
version information and log it for debugging purposes
- bump to 2.4.15rc5

11/08/2023
- improve error message in case of curl timeouts
- bump to 2.4.15rc4
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.15rc4],[hans.zandbelt@openidc.com])
AC_INIT([mod_auth_openidc],[2.4.15rc5],[hans.zandbelt@openidc.com])

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

Expand Down
5 changes: 4 additions & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,10 @@ static apr_byte_t oidc_util_http_call(request_rec *r, const char *url,
#endif

/* identify this HTTP client */
curl_easy_setopt(curl, CURLOPT_USERAGENT, "mod_auth_openidc");
char *useragent = apr_psprintf(r->pool, "%s libcurl-%s %s", NAMEVERSION,
LIBCURL_VERSION, OPENSSL_VERSION_TEXT);
oidc_debug(r, "set HTTP request header User-Agent to: %s", useragent);
curl_easy_setopt(curl, CURLOPT_USERAGENT, useragent);

/* set optional outgoing proxy for the local network */
if (outgoing_proxy->host_port) {
Expand Down

0 comments on commit e8d5adc

Please sign in to comment.