Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory
nodejs-electron
brotli-remove-shared-dictionary.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File brotli-remove-shared-dictionary.patch of Package nodejs-electron
Partially revert https://github.com/chromium/chromium/commit/c1dc375391403442935f1305f5a9782dd1c33f3a and disable dependent code. This removes `brs` from Accept-Encoding list. This feature does not build with brotli < 1.1 --- src/net/filter/brotli_source_stream.cc.orig 2024-07-24 12:50:53.542464800 +0200 +++ src/net/filter/brotli_source_stream.cc 2024-08-04 21:07:52.674333900 +0200 @@ -12,7 +12,6 @@ #include "base/metrics/histogram_macros.h" #include "net/base/io_buffer.h" #include "third_party/brotli/include/brotli/decode.h" -#include "third_party/brotli/include/brotli/shared_dictionary.h" namespace net { @@ -24,21 +23,11 @@ const char kBrotli[] = "BROTLI"; // Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli. class BrotliSourceStream : public FilterSourceStream { public: - explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream, - scoped_refptr<IOBuffer> dictionary = nullptr, - size_t dictionary_size = 0u) - : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)), - dictionary_(std::move(dictionary)), - dictionary_size_(dictionary_size) { + explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream) + : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)) { brotli_state_ = BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this); CHECK(brotli_state_); - if (dictionary_) { - BROTLI_BOOL result = BrotliDecoderAttachDictionary( - brotli_state_, BROTLI_SHARED_DICTIONARY_RAW, dictionary_size_, - reinterpret_cast<const unsigned char*>(dictionary_->data())); - CHECK(result); - } } BrotliSourceStream(const BrotliSourceStream&) = delete; @@ -174,9 +163,6 @@ class BrotliSourceStream : public Filter free(&array[-1]); } - const scoped_refptr<IOBuffer> dictionary_; - const size_t dictionary_size_; - raw_ptr<BrotliDecoderState> brotli_state_; DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS; @@ -198,8 +184,7 @@ std::unique_ptr<FilterSourceStream> Crea std::unique_ptr<SourceStream> previous, scoped_refptr<IOBuffer> dictionary, size_t dictionary_size) { - return std::make_unique<BrotliSourceStream>( - std::move(previous), std::move(dictionary), dictionary_size); + return nullptr; } } // namespace net --- src/services/network/public/cpp/features.cc.old 2024-02-26 14:40:47.616464200 +0000 +++ src/services/network/public/cpp/features.cc 2024-02-26 18:32:53.080944900 +0000 @@ -383,7 +383,7 @@ BASE_FEATURE(kPrefetchNoVarySearch, // decompresses the response body using the dictionary. BASE_FEATURE(kCompressionDictionaryTransportBackend, "CompressionDictionaryTransportBackend", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // When both this feature and the kCompressionDictionaryTransportBackend feature // are enabled, the following will happen:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor