
Inspecting headers of file download
I compile a custom version of Firefox for personal use, and want to understand where to find something in the source code that I can't seem to find myself from documentation or manual searching.
I want to programmatically (i.e. from within the Firefox source) inspect the HTTP headers of all file downloads I initiate, potentially preventing the download if I see a certain header value. Anyone have a good idea of where in the source to do this?
Chosen solution
I think that extensions are able to do this via the Web extension API, so no need to modify Firefox.
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads
All Replies (2)
Chosen Solution
I think that extensions are able to do this via the Web extension API, so no need to modify Firefox.
This question has been locked because the original author has deleted their account. While you can no longer post new replies, the existing content remains available for reference.