Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdn: only gzip encode known mimetypes #174577

Merged
merged 1 commit into from Feb 16, 2023
Merged

cdn: only gzip encode known mimetypes #174577

merged 1 commit into from Feb 16, 2023

Conversation

joaomoreno
Copy link
Member

@joaomoreno joaomoreno commented Feb 16, 2023

When Chrome streams media from web servers while bypassing its cache, it doesn't accept gzip content encoding. We are currently hardcoding gzip encoding for all requests across our CDN. We need to only do this for known mimetypes.

@joaomoreno joaomoreno merged commit b4db415 into main Feb 16, 2023
@joaomoreno joaomoreno deleted the joao/relative-lion branch February 16, 2023 14:30
c-claeys pushed a commit to c-claeys/vscode that referenced this pull request Feb 16, 2023
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug web Issues related to running VSCode in the web labels Feb 17, 2023
@joaomoreno
Copy link
Member Author

For verification:

Bad

Has Content-Encoding: gzip:

joao@speedy:~$ http -h https://main.vscode-cdn.net/stable/441438abd1ac652551dbe4d408dfcec8a499b8bf/out/vs/platform/audioCues/browser/media/error.mp3
HTTP/1.1 200 OK
Cache-Control: max-age=31536000, public
Content-Encoding: gzip
Content-Length: 12072
Content-Type: audio/mpeg
Cross-Origin-Resource-Policy: cross-origin
Date: Fri, 17 Feb 2023 08:50:01 GMT
ETag: 0x8DB0A1BF56470A0
Last-Modified: Wed, 08 Feb 2023 21:32:20 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Vary: Origin
X-Azure-Ref: 0uj/vYwAAAAA1LBR1HmcLRZbe2LzrxWuhWlJIRURHRTEzMTIAMTRhNWQ1NjMtNGE5Ny00MWI4LWFiNDUtNjQ5NzhlODI2YzEw
X-Azure-Ref-OriginShield: 0N9ztYwAAAAAA4muJ480HRYx6K/Yumn1bRlJBMjMxMDUwNDE3MDIzADE0YTVkNTYzLTRhOTctNDFiOC1hYjQ1LTY0OTc4ZTgyNmMxMA==
X-Cache: TCP_HIT
x-ms-blob-type: BlockBlob
x-ms-lease-status: unlocked
x-ms-meta-fsmode: 33204
x-ms-request-id: 23a4d88a-901e-00eb-2fcc-3c1af4000000
x-ms-version: 2009-09-19

Good

No longer has Content-Encoding: gzip:

joao@speedy:~$ http -h https://main.vscode-cdn.net/insider/71f619cbda2b051d0b083a6393b175abd1ef30ad/out/vs/platform/audioCues/browser/media/error.mp3
HTTP/1.1 200 OK
Cache-Control: max-age=31536000, public
Content-Length: 38080
Content-Type: audio/mpeg
Cross-Origin-Resource-Policy: cross-origin
Date: Fri, 17 Feb 2023 08:51:03 GMT
ETag: 0x8DB10A856D4C5BA
Last-Modified: Fri, 17 Feb 2023 05:32:20 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Vary: Origin
X-Azure-Ref: 09z/vYwAAAAAQqnx0r/5wTL47t0LxH/WtRlJBMjMxMDUwNDE4MDI5ADE0YTVkNTYzLTRhOTctNDFiOC1hYjQ1LTY0OTc4ZTgyNmMxMA==
X-Cache: TCP_MISS
x-ms-blob-type: BlockBlob
x-ms-lease-status: unlocked
x-ms-meta-fsmode: 33204
x-ms-request-id: 36c4034c-401e-00e9-60ac-42180e000000
x-ms-version: 2009-09-19

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug web Issues related to running VSCode in the web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants