Files
camoufox-rs/src/api
9prodhiandClaude Opus 5.5 1f406ae002 fix(api): report the final status after redirects reliably
navigate_reports_final_status_after_redirect failed ~50% of runs on main.
Root cause (from captured event traces): a local 302 -> 200 round trip
takes ~490-520ms on Camoufox 158, straddling the fixed 500ms status cap,
so navigate often returned the intermediate 302.

- While a redirect hop is in flight, wait up to 2s (bounded by the
  deadline) for the final status; ordinary navigations keep the 500ms cap.
  An unresolved chain now reports None ("final status not captured")
  instead of the stale 3xx.
- Harden ordering: buffer responses that arrive before their
  requestWillBeSent, never let a late 3xx overwrite a final status, and
  follow redirectedFrom before the navigationId gate.
- Content-Disposition check parses the disposition type instead of
  substring-matching "attachment" (no spurious 2s waits on inline files).
- Use ProtocolError constructors throughout main_frame.rs.

Implemented via Antigravity (gemini-3.8-flash-high); reviewed;
redirect integration test 10/10 on a real browser (was 3/6 on main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:43:41 -06:00
..