From: Viktor Szakats Date: Wed, 24 Dec 2025 23:26:48 +0000 (+0100) Subject: lib: drop unused protocol headers X-Git-Tag: rc-8_18_0-3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e78a466ebddd35d25b14487ef4a03081e13773fe;p=thirdparty%2Fcurl.git lib: drop unused protocol headers - drop unused `http.h` includes. - drop unused `http1.h` include. - drop unused `http2.h` includes. - vssh/ssh.h: drop unused `vssh.h` include. - urldata.h: drop unused protocol includes. - url: include `smtp.h` directly. - rtsp.h: include directly where used. - imap, smtp: drop redundant include, move another from .h to .c. Verified with an all non-unity CI run. Closes #20093 --- diff --git a/lib/cf-h2-proxy.c b/lib/cf-h2-proxy.c index cc9a1672d0..d35d8b4d45 100644 --- a/lib/cf-h2-proxy.c +++ b/lib/cf-h2-proxy.c @@ -37,7 +37,6 @@ #include "bufq.h" #include "curlx/dynbuf.h" #include "dynhds.h" -#include "http1.h" #include "http2.h" #include "http_proxy.h" #include "multiif.h" diff --git a/lib/content_encoding.c b/lib/content_encoding.c index d878bb49ac..7a9eb354e4 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -49,7 +49,6 @@ #include "sendf.h" #include "curl_trc.h" -#include "http.h" #include "content_encoding.h" #define CONTENT_ENCODING_DEFAULT "identity" diff --git a/lib/easy.c b/lib/easy.c index 8926422780..ccdc4f41c4 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -71,7 +71,6 @@ #include "setopt.h" #include "http_digest.h" #include "system_win32.h" -#include "http2.h" #include "curlx/dynbuf.h" #include "bufref.h" #include "altsvc.h" diff --git a/lib/ftp.c b/lib/ftp.c index a402dde5d8..46a309873c 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -48,7 +48,6 @@ #include "progress.h" #include "transfer.h" #include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ #include "ftp.h" #include "fileinfo.h" #include "ftplistparser.h" diff --git a/lib/http.c b/lib/http.c index 3aabd0f7be..8a95c6ba6f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -81,6 +81,7 @@ #include "strdup.h" #include "altsvc.h" #include "hsts.h" +#include "rtsp.h" #include "ws.h" #include "bufref.h" #include "curlx/strparse.h" diff --git a/lib/http2.h b/lib/http2.h index 147d7f76d5..b47cccecc8 100644 --- a/lib/http2.h +++ b/lib/http2.h @@ -27,7 +27,6 @@ #include "curl_setup.h" #ifdef USE_NGHTTP2 -#include "http.h" /* value for MAX_CONCURRENT_STREAMS we use until we get an updated setting from the peer */ diff --git a/lib/http_chunks.c b/lib/http_chunks.c index a12d2dce72..73f93c2bce 100644 --- a/lib/http_chunks.c +++ b/lib/http_chunks.c @@ -30,7 +30,6 @@ #include "curl_trc.h" #include "sendf.h" /* for the client write stuff */ #include "curlx/dynbuf.h" -#include "http.h" #include "multiif.h" #include "curlx/strparse.h" diff --git a/lib/imap.c b/lib/imap.c index c5da40c4e4..18405e7b44 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -61,7 +61,7 @@ #include "progress.h" #include "transfer.h" #include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "pingpong.h" #include "imap.h" #include "mime.h" #include "curlx/strparse.h" diff --git a/lib/imap.h b/lib/imap.h index 2bab0b4dde..4433dcf035 100644 --- a/lib/imap.h +++ b/lib/imap.h @@ -24,9 +24,6 @@ * ***************************************************************************/ -#include "pingpong.h" -#include "curl_sasl.h" - extern const struct Curl_handler Curl_handler_imap; extern const struct Curl_handler Curl_handler_imaps; diff --git a/lib/pop3.c b/lib/pop3.c index f0216db25a..97a34ff4d8 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -62,7 +62,6 @@ #include "progress.h" #include "transfer.h" #include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ #include "pingpong.h" #include "pop3.h" #include "vtls/vtls.h" diff --git a/lib/sendf.c b/lib/sendf.c index b50e3dcac1..96f5c49e0d 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -44,7 +44,6 @@ #include "cw-pause.h" #include "multiif.h" #include "strerror.h" -#include "http2.h" #include "progress.h" diff --git a/lib/setopt.c b/lib/setopt.c index e3b5146b77..5c0edfa01f 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -43,7 +43,6 @@ #include "vtls/vtls.h" #include "curl_trc.h" #include "hostip.h" -#include "http2.h" #include "setopt.h" #include "altsvc.h" #include "hsts.h" diff --git a/lib/smtp.c b/lib/smtp.c index 031dcc9bda..bfd238a13b 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -64,7 +64,7 @@ #include "progress.h" #include "transfer.h" #include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "pingpong.h" #include "mime.h" #include "smtp.h" #include "vtls/vtls.h" diff --git a/lib/smtp.h b/lib/smtp.h index ed9824b14c..5111c62ae6 100644 --- a/lib/smtp.h +++ b/lib/smtp.h @@ -24,9 +24,6 @@ * ***************************************************************************/ -#include "pingpong.h" -#include "curl_sasl.h" - extern const struct Curl_handler Curl_handler_smtp; extern const struct Curl_handler Curl_handler_smtps; diff --git a/lib/transfer.c b/lib/transfer.c index c365d0896d..b567d14abd 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -69,7 +69,6 @@ #include "getinfo.h" #include "multiif.h" #include "connect.h" -#include "http2.h" #include "mime.h" #include "hsts.h" #include "setopt.h" diff --git a/lib/url.c b/lib/url.c index 5340f5a4c9..556d140ee2 100644 --- a/lib/url.c +++ b/lib/url.c @@ -107,7 +107,6 @@ #include "telnet.h" #include "tftp.h" #include "http.h" -#include "http2.h" #include "file.h" #include "curl_ldap.h" #include "vssh/ssh.h" @@ -117,6 +116,8 @@ #include "curl_rtmp.h" #include "gopher.h" #include "mqtt.h" +#include "rtsp.h" +#include "smtp.h" #include "ws.h" #ifdef USE_NGHTTP2 diff --git a/lib/urldata.h b/lib/urldata.h index 3940c4d391..486cfd4173 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -173,12 +173,8 @@ typedef CURLcode (Curl_recv)(struct Curl_easy *data, /* transfer */ size_t *pnread); /* how much received */ #include "mime.h" -#include "imap.h" -#include "smtp.h" #include "ftp.h" -#include "file.h" #include "http.h" -#include "rtsp.h" #include "smb.h" #include "mqtt.h" #include "ftplistparser.h" diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 98c109ab59..1a007cd561 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -49,7 +49,6 @@ #include "../hostip.h" #include "../progress.h" #include "../transfer.h" -#include "../http.h" /* for HTTP proxy tunnel stuff */ #include "ssh.h" #include "../url.h" #include "../cfilters.h" diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index 4d43ddd9f1..6357f41b79 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -48,7 +48,6 @@ #include "../hostip.h" #include "../progress.h" #include "../transfer.h" -#include "../http.h" /* for HTTP proxy tunnel stuff */ #include "ssh.h" #include "../url.h" #include "../cfilters.h" diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index ad0875f191..40b26e6cb7 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -36,8 +36,6 @@ #include #endif -#include "vssh.h" - /* meta key for storing protocol meta at easy handle */ #define CURL_META_SSH_EASY "meta:proto:ssh:easy" /* meta key for storing protocol meta at connection */ diff --git a/tests/unit/unit2603.c b/tests/unit/unit2603.c index b3ade82a62..0afa26edeb 100644 --- a/tests/unit/unit2603.c +++ b/tests/unit/unit2603.c @@ -24,7 +24,6 @@ #include "unitcheck.h" #include "urldata.h" -#include "http.h" #include "http1.h" #include "curl_trc.h"