]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: drop unused protocol headers
authorViktor Szakats <commit@vsz.me>
Wed, 24 Dec 2025 23:26:48 +0000 (00:26 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 25 Dec 2025 11:00:22 +0000 (12:00 +0100)
- 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

21 files changed:
lib/cf-h2-proxy.c
lib/content_encoding.c
lib/easy.c
lib/ftp.c
lib/http.c
lib/http2.h
lib/http_chunks.c
lib/imap.c
lib/imap.h
lib/pop3.c
lib/sendf.c
lib/setopt.c
lib/smtp.c
lib/smtp.h
lib/transfer.c
lib/url.c
lib/urldata.h
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/ssh.h
tests/unit/unit2603.c

index cc9a1672d0bcc5c70400f4e84a7719aae1d66c74..d35d8b4d459765325cd1230348c20b8e282ad5f0 100644 (file)
@@ -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"
index d878bb49ac27f01fb56e834330e782742af325eb..7a9eb354e471885f096a0acd85993c6cbae2ab4c 100644 (file)
@@ -49,7 +49,6 @@
 
 #include "sendf.h"
 #include "curl_trc.h"
-#include "http.h"
 #include "content_encoding.h"
 
 #define CONTENT_ENCODING_DEFAULT  "identity"
index 8926422780f45e2bb55593c8a97ecda3919d0db5..ccdc4f41c4cf4d183ed3e445414d1c2adb61c27c 100644 (file)
@@ -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"
index a402dde5d8f4182453e8c4516de3d516c48ceac0..46a309873cc84183522393401f5c008d75199ca7 100644 (file)
--- 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"
index 3aabd0f7be3675910abd74a81ae35295ecf7e4d5..8a95c6ba6ffcff13bf1eaaf52fff41b779a4545c 100644 (file)
@@ -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"
index 147d7f76d5389d44bc3421c2e0c3f3ae19ec035c..b47cccecc8b2720dc4485de9936ce70507a4d622 100644 (file)
@@ -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 */
index a12d2dce72c8704a876aa91a53d4d6d15ac4dd2e..73f93c2bce78e0cc61a84dd51c33645d373907d8 100644 (file)
@@ -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"
 
index c5da40c4e45ee505dc531b7642aacf5f0bc18621..18405e7b4407f71622c237341c2bbebb0b36a691 100644 (file)
@@ -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"
index 2bab0b4ddea7887621ca8f6f9a5ffd1b1b40038c..4433dcf0356ded1bfa738e557cbc99b2e3a75c6a 100644 (file)
@@ -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;
 
index f0216db25a52fe34f14858ac183001c42ebd46c8..97a34ff4d88d10acbb6bf4211f6bb57117cb4bc0 100644 (file)
@@ -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"
index b50e3dcac1b076ec12d8cd9d9cd77fb1ac9b9f6d..96f5c49e0d552c72a6b17144d42d4bf8cf9486fc 100644 (file)
@@ -44,7 +44,6 @@
 #include "cw-pause.h"
 #include "multiif.h"
 #include "strerror.h"
-#include "http2.h"
 #include "progress.h"
 
 
index e3b5146b770d6f0c6c53be2063fcb8320b7e29d4..5c0edfa01fa38509863419658d3adf700b8bc075 100644 (file)
@@ -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"
index 031dcc9bdad65c974fcd458e1d74bfb3cdede35f..bfd238a13ba034a5af79a60df7c8d0f8ce05c94d 100644 (file)
@@ -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"
index ed9824b14cc3961acc30b78437cc36231cb226ca..5111c62ae6e34ae8f236e3707a3f72f82300d408 100644 (file)
@@ -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;
 
index c365d0896ddd360a38ad79ed183d5284fd8ddc5e..b567d14abd5d9128f48917ffeacdf003e2153e92 100644 (file)
@@ -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"
index 5340f5a4c99dcbd37bbfbec6125c913bf81a109f..556d140ee222cd9700a6aa8919d714d6907bce7c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
 #include "telnet.h"
 #include "tftp.h"
 #include "http.h"
-#include "http2.h"
 #include "file.h"
 #include "curl_ldap.h"
 #include "vssh/ssh.h"
 #include "curl_rtmp.h"
 #include "gopher.h"
 #include "mqtt.h"
+#include "rtsp.h"
+#include "smtp.h"
 #include "ws.h"
 
 #ifdef USE_NGHTTP2
index 3940c4d391da2f4c245b7d2011470d13f19b033e..486cfd4173dc5a3288dd1369931f57a85bc61fb3 100644 (file)
@@ -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"
index 98c109ab59a344101a508d10a1330f0530398668..1a007cd56139ef5375680755eeb06f2f886d81b9 100644 (file)
@@ -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"
index 4d43ddd9f1287cef4350af9159e726ea9af55814..6357f41b79d58d79146dd2fb751b1f9618fbdf73 100644 (file)
@@ -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"
index ad0875f191433e07f676f74744088f92bde8e34c..40b26e6cb7b3a087d76eeb3abd02ac546305e133 100644 (file)
@@ -36,8 +36,6 @@
 #include <libssh/sftp.h>
 #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 */
index b3ade82a620f2c0ef157e442c87bf1517a6fc5ab..0afa26edeb244b68fd905f29ceecc9ef6450ad66 100644 (file)
@@ -24,7 +24,6 @@
 #include "unitcheck.h"
 
 #include "urldata.h"
-#include "http.h"
 #include "http1.h"
 #include "curl_trc.h"