From 3bfbc5cf7b53a06e3fd400b057313e4d4e869bf6 Mon Sep 17 00:00:00 2001 From: Pierre LADEN Date: Mon, 24 Jun 2024 18:43:41 +0200 Subject: [PATCH] allow to use local file through file:// protocol for metadata or jwks --- src/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http.c b/src/http.c index cfe6f58..1c78b93 100644 --- a/src/http.c +++ b/src/http.c @@ -1014,12 +1014,12 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data, #ifndef LIBCURL_NO_CURLPROTO #if LIBCURL_VERSION_NUM >= 0x075500 curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "http,https"); - curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,https"); + curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,https,file"); #else curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); curl_easy_setopt(curl, CURLOPT_PROTOCOLS, - CURLPROTO_HTTP | CURLPROTO_HTTPS); + CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE); #endif #endif