Landing a Patch in Firefox

fratellobigio1 pts0 comments

🏔️ ">Landing a patch in Firefox - FratelloBigioLanding a patch in Firefox<br>2026-07-01<br>393 words<br>2 minutes<br>firefox bugfix open-source<br>I landed my first patch in Firefox!

Hey everyone! I have a story about how a PR comment for a 1-line change I made in our product led me to discover a dormant 16-year-old bug in Firefox.<br>The issue<br>About a month ago at $DAYJOB I found an issue in our product that only happened in Firefox. The issue was in the export feature, which creates .tar.gz archives and downloads them to the user&rsquo;s machine.<br>While exports generated in Chrome or Edge worked fine, exports generated in Firefox could not later be re-imported into the product.<br>Looking at logs from the backend service, I discovered that the files exported using Firefox were double-compressed which would cause the import to fail, so I tried instructing our reverse proxy to not compress .tar.gz files, and the issue was resolved.<br>I submitted a 1-line PR, and got this comment (redacted for privacy):

The bug(s)<br>At that point I started looking around, and I found these 2 bugs in Firefox&rsquo;s bug tracker:<br>Bug 610679 - &ldquo;Tarball is double gzipped when downloaded with Firefox&rdquo; (filed in 2010)<br>Bug 1470011 - &ldquo;.tar.gz files mangled on download by double compression&rdquo; (filed in 2018)<br>Both had been dormant for years, so I decided to take the initiative and see if I could contribute a fix.<br>The solution<br>It turns out that digging into a codebase with tens of millions of lines of code can be challenging.<br>With some suggestions from the maintainers (and some help from Claude Code), I decided to introduce a new preference named network.http.decode_content_for_known_compressed_extensions (true by default).<br>The preference controls whether Firefox should decode the response body per the Content-Encoding header when the file extension in the URL matches the encoding type. When the preference is set to false, Firefox will fall back to the legacy behaviour of not decoding the body, which produces the double-compression issue.<br>After some testing on my local machine, I submitted a small patch, and after a couple of rounds of review the commit was merged and should be included in Firefox 154!   <br>Acknowledgements<br>I&rsquo;d like to thank Valentin and Gijs for their help and guidance, and for being patient while I learned the ropes of contributing to Firefox. If you&rsquo;d also like to contribute, check out this page for more information on how to get started.<br>Till next time!

Pages<br>Home<br>Archives<br>About<br>Search<br>RSS

Links

CV

GitHub

Twitter

Bluesky

Mastodon

LinkedIn

Drop me a line

Tags<br>Ansible<br>Bugfix<br>Docker<br>Firefox<br>Github<br>Github Actions<br>Hello World<br>Helm<br>How-To<br>Java<br>Kubernetes<br>Newrelic<br>Nifi<br>Open-Source<br>Rke2<br>Weekend-Project<br>Windows<br>Wsl2

Table of Contents

Pages<br>Home<br>Archives<br>About<br>Search<br>RSS

Links

CV

GitHub

Twitter

Bluesky

Mastodon

LinkedIn

Drop me a line

Tags<br>Ansible<br>Bugfix<br>Docker<br>Firefox<br>Github<br>Github Actions<br>Hello World<br>Helm<br>How-To<br>Java<br>Kubernetes<br>Newrelic<br>Nifi<br>Open-Source<br>Rke2<br>Weekend-Project<br>Windows<br>Wsl2

Table of Contents

firefox github patch issue line rsquo

Related Articles