Skip to content

Disable Chrome's HttpsUpgrades feature to fix plain-HTTP proxying - #45

Open
bconik wants to merge 1 commit into
mandatoryprogrammer:mainfrom
bconik:fix/chrome-http-navigation-timeout
Open

Disable Chrome's HttpsUpgrades feature to fix plain-HTTP proxying#45
bconik wants to merge 1 commit into
mandatoryprogrammer:mainfrom
bconik:fix/chrome-http-navigation-timeout

Conversation

@bconik

@bconik bconik commented Jul 27, 2026

Copy link
Copy Markdown

Every plain-HTTP request proxied through thermoptic times out and returns a 502, regardless of target site.

Chrome's HttpsUpgrades feature silently rewrites top-level http:// navigations to https:// before making the real request. cdp.js's manual_browser_visit() registers its CDP Fetch domain interception pattern against the original http:// URL and then calls Page.navigate with that same URL, expecting Fetch.requestPaused to fire once the response comes back. Since the actual outgoing request is for the upgraded https:// URL, the interception pattern never matches, Fetch.requestPaused never fires, and the request sits until the internal timeout fires, surfacing to the client as a 502.

Adding HttpsUpgrades to Chrome's --disable-features list stops the silent rewrite so the navigation matches the interception pattern and completes normally.

Every plain-HTTP request proxied through thermoptic times out and returns
a 502, regardless of the target site.

Chrome's HttpsUpgrades feature silently rewrites top-level http://
navigations to https:// before making the real request. cdp.js's
manual_browser_visit() registers its CDP Fetch domain interception pattern
against the original http:// URL and then calls Page.navigate with that
same URL, expecting Fetch.requestPaused to fire once the response comes
back. Since the actual outgoing request is for the upgraded https:// URL,
the interception pattern never matches, Fetch.requestPaused never fires,
and the request sits until the internal timeout fires, surfacing to the
client as a 502.

Adding HttpsUpgrades to Chrome's --disable-features list stops the silent
rewrite so the navigation matches the interception pattern and completes
normally.
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.

2 participants