summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-12-17 02:10:09 -0800
committerThomas Groman <tgroman@nuegia.net>2020-12-17 02:10:09 -0800
commita0c9e3200470c86563d6eff47156eff24bfd1491 (patch)
tree18d47c32a189be82aec4ce517d33ffaf51ab2b01 /netwerk/protocol
parente8dada8eff0b36a98b514af6adc039d2920a2109 (diff)
downloadUXP-a0c9e3200470c86563d6eff47156eff24bfd1491.tar
UXP-a0c9e3200470c86563d6eff47156eff24bfd1491.tar.gz
UXP-a0c9e3200470c86563d6eff47156eff24bfd1491.tar.lz
UXP-a0c9e3200470c86563d6eff47156eff24bfd1491.tar.xz
UXP-a0c9e3200470c86563d6eff47156eff24bfd1491.zip
Don't send a User-Agent by default
Diffstat (limited to 'netwerk/protocol')
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp10
1 files changed, 10 insertions, 0 deletions
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.<site> 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