Skip to content

Conversation

@apastel
Copy link
Contributor

@apastel apastel commented Jan 31, 2026

Fixes #857

Supports all three of the following formats for pasting headers:

  1. Firefox
  2. Chrome (new format without colons)
  3. Chrome (old format with colons on header keys)

Had to add a corner case to handled the odd Decoded: header in Chrome, which looks like the following:

Decoded:
message ClientVariations {
  // Active Google-visible variation IDs on this client. These are reported for analysis, but do not directly affect any server-side behavior.
  repeated int32 variation_id = [3300102, 3300132, 3313321, 3323055, 3330197, 3362821, 3393046, 3393674, 3395745, 3396053, 3396249, 3396352, 3396365, 3396446, 3396569, 3396819, 3396954, 3397042, 3397046];
  // Active Google-visible variation IDs on this client that trigger server-side behavior. These are reported for analysis *and* directly affect server-side behavior.
  repeated int32 trigger_variation_id = [3392236, 3396349];
}

It's the only one that still has a colon on the header key so it had to be handled differently. The end result in the parsed user_headers is the same as it was before, where the property ends up being Decoded: "}"

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (5578f89) to head (149b4dd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #865   +/-   ##
=======================================
  Coverage   95.51%   95.51%           
=======================================
  Files          46       46           
  Lines        2543     2543           
=======================================
  Hits         2429     2429           
  Misses        114      114           
Flag Coverage Δ
unittests 95.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apastel apastel force-pushed the fix-chrome-auth-857 branch from d944d8e to 149b4dd Compare January 31, 2026 22:19
@apastel apastel closed this Jan 31, 2026
@apastel apastel reopened this Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Authentication Failed" when pasting request headers from Chrome

1 participant