diff -upr dillo/dillorc work/dillorc --- dillo/dillorc Wed Apr 15 13:31:39 2026 +++ work/dillorc Wed Apr 15 13:36:19 2026 @@ -294,6 +294,12 @@ search_url="mj Mojeek https://www.mojeek.com/search?q= # http_user_agent="Wget/1.13.4 (linux-gnu)" #The default is "Dillo/"+current_version_number +# Send DNT (Do Not Track) header +#http_dnt=YES + +# Send Sec-GPC (Global Privacy Control) header +#http_sec_gpc=YES + #------------------------------------------------------------------------- # COLORS SECTION #------------------------------------------------------------------------- diff -upr dillo/src/IO/http.c work/src/IO/http.c --- dillo/src/IO/http.c Wed Apr 15 13:31:39 2026 +++ work/src/IO/http.c Wed Apr 15 17:20:48 2026 @@ -416,6 +416,12 @@ static Dstr *Http_make_query_str(DilloWeb *web, bool_t cookies = a_Cookies_get_query(url, web->requester, web->flags & WEB_RootUrl); auth = a_Auth_get_auth_str(url, request_uri->str); referer = Http_get_referer(url); + char *http_dnt = dStrdup(""); + if (prefs.http_dnt) + http_dnt = dStrdup("DNT: 1\r\n"); + char *http_sec_gpc = dStrdup(""); + if (prefs.http_sec_gpc) + http_sec_gpc = dStrdup("Sec-GPC: 1\r\n"); if (URL_FLAGS(url) & URL_Post) { Dstr *content_type = Http_make_content_type(url); dStr_sprintfa( @@ -431,7 +437,6 @@ static Dstr *Http_make_query_str(DilloWeb *web, bool_t #endif "\r\n" "%s" /* auth */ - "DNT: 1\r\n" "%s" /* proxy auth */ "%s" /* referer */ "Connection: %s\r\n" @@ -442,7 +447,7 @@ static Dstr *Http_make_query_str(DilloWeb *web, bool_t request_uri->str, URL_AUTHORITY(url), prefs.http_user_agent, accept_hdr_value, HTTP_Language_hdr, auth ? auth : "", proxy_auth->str, referer, connection_hdr_val, content_type->str, - (long)URL_DATA(url)->len, cookies); + http_dnt, http_sec_gpc, (long)URL_DATA(url)->len, cookies); dStr_append_l(query, URL_DATA(url)->str, URL_DATA(url)->len); dStr_free(content_type, TRUE); } else { @@ -459,7 +464,6 @@ static Dstr *Http_make_query_str(DilloWeb *web, bool_t #endif "\r\n" "%s" /* auth */ - "DNT: 1\r\n" "%s" /* proxy auth */ "%s" /* referer */ "Connection: %s\r\n" @@ -468,7 +472,7 @@ static Dstr *Http_make_query_str(DilloWeb *web, bool_t "\r\n", request_uri->str, URL_AUTHORITY(url), prefs.http_user_agent, accept_hdr_value, HTTP_Language_hdr, auth ? auth : "", - proxy_auth->str, referer, connection_hdr_val, + proxy_auth->str, referer, connection_hdr_val, http_dnt, http_sec_gpc, (URL_FLAGS(url) & URL_E2EQuery) ? "Pragma: no-cache\r\nCache-Control: no-cache\r\n" : "", cookies); diff -upr dillo/src/prefs.c work/src/prefs.c --- dillo/src/prefs.c Wed Apr 15 13:31:39 2026 +++ work/src/prefs.c Wed Apr 15 15:16:08 2026 @@ -72,6 +72,8 @@ void a_Prefs_init(void) prefs.http_strict_transport_security = TRUE; prefs.http_force_https = FALSE; prefs.http_user_agent = dStrdup(PREFS_HTTP_USER_AGENT); + prefs.http_dnt = TRUE; + prefs.http_sec_gpc = TRUE; prefs.limit_text_width = FALSE; prefs.adjust_min_width = TRUE; prefs.adjust_table_min_width = TRUE; diff -upr dillo/src/prefs.h work/src/prefs.h --- dillo/src/prefs.h Wed Apr 15 13:31:39 2026 +++ work/src/prefs.h Wed Apr 15 15:16:25 2026 @@ -105,6 +105,8 @@ typedef struct { bool_t http_persistent_conns; bool_t http_strict_transport_security; bool_t http_force_https; + bool_t http_dnt; + bool_t http_sec_gpc; int32_t buffered_drawing; char *font_serif; char *font_sans_serif; diff -upr dillo/src/prefsparser.cc work/src/prefsparser.cc --- dillo/src/prefsparser.cc Wed Apr 15 13:31:39 2026 +++ work/src/prefsparser.cc Wed Apr 15 15:17:16 2026 @@ -181,6 +181,8 @@ void PrefsParser::parse(FILE *fp) PREFS_BOOL, 0 }, { "http_force_https", &prefs.http_force_https, PREFS_BOOL, 0 }, { "http_user_agent", &prefs.http_user_agent, PREFS_STRING, 0 }, + { "http_dnt", &prefs.http_dnt, PREFS_BOOL, 0 }, + { "http_sec_gpc", &prefs.http_sec_gpc, PREFS_BOOL, 0 }, { "limit_text_width", &prefs.limit_text_width, PREFS_BOOL, 0 }, { "adjust_min_width", &prefs.adjust_min_width, PREFS_BOOL, 0 }, { "adjust_table_min_width", &prefs.adjust_table_min_width, PREFS_BOOL, 0 },