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

Deflate does not work if both flags about zstd are enable #15626

Closed
2 tasks done
jefer94 opened this issue Nov 22, 2023 · 2 comments
Closed
2 tasks done

Deflate does not work if both flags about zstd are enable #15626

jefer94 opened this issue Nov 22, 2023 · 2 comments
Assignees
Labels

Comments

@jefer94
Copy link

jefer94 commented Nov 22, 2023

FAQ

URL

https://breathecode-test.herokuapp.com/v1/admissions/syllabus/version?sdfaeeeeeeer

What happened?

Chrome is not decompressing Deflate if all the flags related to zstd are enabled, and Chrome is saying me that it support Deflate, but in this case it is false

image

What did you expect?

That I could use Deflate with these flags

What have you tried?

If these headers are enable, Chrome and Chromium can't decode a request encoded with Deflate
https://breathecode-test.herokuapp.com/v1/admissions/syllabus/version?sdfaeeeeeeer

Enable
image

Disable
image

When you change these setting you must add other letter to the url because this endpoint includes the etag and the right/wrong response will be cached

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

Chrome 121

Chrome Version

Version 121.0.6129.0 (Official Build) unknown (64-bit)

Node Version

No response

OS

Linux fedora 6.5.11-300.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 8 22:37:57 UTC 2023 x86_64 GNU/Linux

Relevant log output

No response

@jefer94
Copy link
Author

jefer94 commented Nov 22, 2023

Hey, I will add a patch to that server to avoid it happens in production, you must pass only deflate to Accept-Encoding to force this error

            accept_encoding = request.META.get('HTTP_ACCEPT_ENCODING', '')

            # chrome have a bug when all zstd flags are enabled, deflate is not decoded in this case
            is_deflate_default = 'zstd' not in accept_encoding

I will check if have an error in my code, wait a minutes

@jefer94
Copy link
Author

jefer94 commented Nov 22, 2023

never mind, this issue was cause by a double compression caused by if that must be an elif

@jefer94 jefer94 closed this as completed Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants