From ffe0356dc32fb96076300e53185ec825aa737841 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 23 May 2024 09:36:06 +0000 Subject: [PATCH] Bug 1797846 - Remove network.url.strip-data-url-whitespace pref r=valentin,sunil,necko-reviewers Differential Revision: https://phabricator.services.mozilla.com/D209433 --- modules/libpref/init/StaticPrefList.yaml | 6 ------ netwerk/protocol/data/nsDataHandler.cpp | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 2163a15520da..5bbd4976e341 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -13042,12 +13042,6 @@ value: 32 * 1024 * 1024 mirror: always -# Should be removed if no breakage occurs. See bug 1797846 -- name: network.url.strip-data-url-whitespace - type: RelaxedAtomicBool - value: false - mirror: always - # If true, will be more strict with status code parsing - name: network.url.strict_data_url_base64_placement type: RelaxedAtomicBool diff --git a/netwerk/protocol/data/nsDataHandler.cpp b/netwerk/protocol/data/nsDataHandler.cpp index e9a72cd9ed91..15f438c737b3 100644 --- a/netwerk/protocol/data/nsDataHandler.cpp +++ b/netwerk/protocol/data/nsDataHandler.cpp @@ -50,9 +50,7 @@ nsDataHandler::GetScheme(nsACString& result) { // Strip whitespace unless this is text, where whitespace is important // Don't strip escaped whitespace though (bug 391951) nsresult rv; - if (base64 || (StaticPrefs::network_url_strip_data_url_whitespace() && - strncmp(contentType.get(), "text/", 5) != 0 && - contentType.Find("xml") == kNotFound)) { + if (base64) { // it's ascii encoded binary, don't let any spaces in rv = NS_MutateURI(new mozilla::net::nsSimpleURI::Mutator()) .Apply(&nsISimpleURIMutator::SetSpecAndFilterWhitespace, aSpec,