From a0c9e3200470c86563d6eff47156eff24bfd1491 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 17 Dec 2020 02:10:09 -0800 Subject: Don't send a User-Agent by default --- netwerk/protocol/http/nsHttpHandler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 7a29e041b..91c3ec49f 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -451,10 +451,20 @@ nsHttpHandler::AddStandardRequestHeaders(nsHttpRequestHead *request, { nsresult rv; +/* The "User-Agent header is not used for it's original purpose of tracking + * malfuctioning software but instead abused 99.9999999% of the time to do + * fingerprinting, mass survailance, and anticompetive software vendor + * descrimination. Most vendors just hardcode something pretending to be + * Mozilla 5.0 here anyways when they are obvious not Mozilla 5.0 so we just + * get rid of it. It's perfectly within RFC HTTP1.1 spec to not supply + * this header and it says it's a SHOULD not MUST. + * Use general.useragent.override. for compat workarounds if need be. + * // Add the "User-Agent" header rv = request->SetHeader(nsHttp::User_Agent, UserAgent(), false, nsHttpHeaderArray::eVarietyRequestDefault); if (NS_FAILED(rv)) return rv; +*/ // MIME based content negotiation lives! // Add the "Accept" header. Note, this is set as an override because the -- cgit v1.2.3