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
This commit is contained in:
Viktor Szakats 2025-12-25 00:26:48 +01:00
parent adca486c12
commit e78a466ebd
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
21 changed files with 5 additions and 28 deletions

View 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"

View file

@ -49,7 +49,6 @@
#include "sendf.h"
#include "curl_trc.h"
#include "http.h"
#include "content_encoding.h"
#define CONTENT_ENCODING_DEFAULT "identity"

View 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"

View file

@ -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"

View 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"

View 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 */

View 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"

View 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"

View 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;

View 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"

View file

@ -44,7 +44,6 @@
#include "cw-pause.h"
#include "multiif.h"
#include "strerror.h"
#include "http2.h"
#include "progress.h"

View 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"

View 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"

View 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;

View 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"

View file

@ -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

View 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"

View 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"

View 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"

View 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 */

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#include "urldata.h"
#include "http.h"
#include "http1.h"
#include "curl_trc.h"