← Commit list

c791223743

Daniel Stenberg
Daniel Stenberg
2025-11-10
SUCCESS Duration: 141s

Subject

setopt: disable CURLOPT_HAPROXY_CLIENT_IP on NULL

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/setopt.c+3 -2
@@ -2169,8 +2169,9 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
* Set the client IP to send through HAProxy PROXY protocol
*/
result = Curl_setstropt(&s->str[STRING_HAPROXY_CLIENT_IP], ptr);
- /* enable the HAProxy protocol */
- s->haproxyprotocol = TRUE;
+
+ /* enable the HAProxy protocol if an IP is provided */
+ s->haproxyprotocol = !!s->str[STRING_HAPROXY_CLIENT_IP];
break;
#endif