Repository navigation
Ask the cloud for an uncompressed answer in the test relay (not a fix for #12) - #30
Draft
jwrosewell wants to merge 1 commit into
Draft
jwrosewell wants to merge 1 commit into
jwrosewell wants to merge 1 commit into
Conversation
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.
Not a fix for #12, and not for release. Run against the two remote hosts over HTTPS with this commit, both browser cache tests and both client-side override tests still failed on both hosts, so a compressed answer is not what stops the page defining
fod. The details are under "How it was checked". Kept as a draft until the cause is found, because asking foridentitymay still belong in the eventual fix.The problem
TestHelpers.ProxyingListenerserves a test page fromhttp://localhost:<port>/and relays/api/requests to the cloud under test.HttpServer.ProxyToforwarded every browser header,Accept-Encodingincluded, and copied the cloud's answer back with itsContent-Encodingunchanged. A cloud reached over HTTPS answersContent-Encoding: brto a browser'sgzip, deflate, br, zstd, and over plain HTTP the same cloud answersgzip. Relayed to the page, the gzip answer works and the Brotli answer leavesfodundefined, soJavaScript_BrowserCache_ChromeandJavaScript_BrowserCache_FireFoxfail against any cloud reached over HTTPS, as #12 sets out.Checked again on 14 November 2026 against two remote hosts. Both browser cache tests failed over HTTPS on both hosts with
scriptLoaded=True, fodDefined=False, and passed on both hosts over plain HTTP. The hosts answeredContent-Encoding: brover HTTPS andgzipover HTTP.The change
The relay no longer forwards the browser's
Accept-Encoding, and sendsAccept-Encoding: identityinstead, so the cloud answers uncompressed and the bytes copied back are plain whatever the cloud would otherwise choose. Leaving the header out would not be enough, because RFC 9110 section 12.5.3 says "If no Accept-Encoding header field is in the request, any content coding is considered acceptable by the user agent". The same section defines "identity" as a synonym for no encoding. Asked withidentity, both hosts answered with noContent-Encoding.Every relay in
HttpServergoes throughProxyTo, so the example relays get uncompressed answers too. No test in the suite checks the encoding of a relayed answer.How it was checked
JavaScript_BrowserCache_Chrome,JavaScript_BrowserCache_FireFoxand bothJavaScript_ClientSideOverridescases, the same four as without the change.fodundefined, with one console error,Uncaught ReferenceError: fod is not defined, from the page's ownwindow.onload. The same with six different resource keys.Host: localhost:<port>, it is about 55 KB and endsvar fod=new fiftyoneDegreesManager. Served from a local web server, both versions definefodin headless Chrome with no error. So the fault lies in what the browser receives through the relay from a remote cloud, which is not yet established.