Skip to content

Commit ee55d94

Browse files
authored
Remove CURL warning and Makefile fix (#5110)
* Makefile: bash is required for LICENSES.txt * Conditionally use the older or the newer CURLOPT CURLOPT_PROTOCOLS_STR is available since CURL 7.85.0
1 parent 29500bc commit ee55d94

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ DOC_FILES+= LICENSE LICENSES.txt INTRODUCTION.md README.md \
99

1010
PKGNAME?= librdkafka
1111
VERSION?= $(shell python3 packaging/get_version.py src/rdkafka.h)
12+
SHELL = bash
1213

1314
# Jenkins CI integration
1415
BUILD_NUMBER ?= 1

src/rdhttp.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,15 @@ rd_http_error_t *rd_http_req_init(rd_http_req_t *hreq, const char *url) {
139139
hreq->hreq_buf = rd_buf_new(1, 1024);
140140

141141
curl_easy_setopt(hreq->hreq_curl, CURLOPT_URL, url);
142+
#if CURL_AT_LEAST_VERSION(7, 85, 0)
143+
curl_easy_setopt(hreq->hreq_curl, CURLOPT_PROTOCOLS_STR, "http,https");
144+
#else
145+
/* As of 06/10/2025 Debian 10 and CentOS Stream 9 ship with
146+
* older CURL versions, remove this condition once they're not supported
147+
* anymore. */
142148
curl_easy_setopt(hreq->hreq_curl, CURLOPT_PROTOCOLS,
143149
CURLPROTO_HTTP | CURLPROTO_HTTPS);
150+
#endif
144151
curl_easy_setopt(hreq->hreq_curl, CURLOPT_MAXREDIRS, 16);
145152
curl_easy_setopt(hreq->hreq_curl, CURLOPT_TIMEOUT, 30);
146153
curl_easy_setopt(hreq->hreq_curl, CURLOPT_ERRORBUFFER,

0 commit comments

Comments
 (0)