Conversation
The four Sec-Fetch values were paired with the wrong header names, so every generated header set carried values invalid for the header they appear on. Corrected to match the upstream fingerprint-suite assignment.
|
This seems related as well: in generator.py. It looks like the condition is inverted, and HTTP/2 headers are pascalized, instead of intended HTTP/1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
HeaderGeneratoremits all fourSec-Fetch-*headers with values that are invalid for the header they appear on. Every generated header set is affected.Headers from
HeaderGenerator().generate(browser='chrome'), sent withrequeststohttps://httpbin.org/headers:Sec-Fetch-Modecors,navigate,no-cors,same-origin,websocketsame-siteSec-Fetch-Destdocument,empty,image,script, …navigateSec-Fetch-Sitecross-site,same-origin,same-site,none?1Sec-Fetch-User?1(boolean, only sent when true)documentEach value is valid, but on the wrong header.
Fix
Corrects the values in both constants to match the spec and upstream fingerprint-suite's assignment (
site → same-site,mode → navigate,user → ?1,dest → document). Keys unchanged.Sec-Fetch-Siteis context-dependent in a real browser (noneon a fresh top-level navigation), so this keeps upstream'ssame-siterather than change behavior beyond the swap.Verification
Passes on this branch, fails on
main. Safari is unaffected.