Skip to content

Conversation

kamermans
Copy link

Since Safari doesn't support zstd yet, I have to keep brotli enabled, however, this module is run after brotli, so if both are supported, brotli is used. This is a problem since all browsers that support zstd also support brotli, so zstd is never actually used.

This PR reorders the module/filter before brotli so it takes priority (since it's faster and the compression is better).

I took this patch from #40 by @mklooss (thanks!)

@SuperSandro2000
Copy link
Contributor

SuperSandro2000 commented Feb 6, 2025

Is this a duplicate of #31?

Or this is a bug fix for f4ba115 ?

@mklooss
Copy link

mklooss commented Feb 12, 2025

@SuperSandro2000 you need this patch when u want brotli and zstd running at the same time.
The Filters Running fine, but "static" Files does not work properly.
Bcz Brotli always wins.

@n-rodriguez
Copy link

Hi there! Any news?

@MarcoMarcoaldi
Copy link

MarcoMarcoaldi commented Aug 29, 2025

Hi, last day i try to compile NGINX 1.29.1 with OpenSSL 3.5.2 and zstd-nginx-module, anyway sometimes NGINX respond using br compression instead zstd. I cannot understand why.

When i test with command line curl like this :

curl -sS --http2 -D - -o /dev/null -H 'Accept-Encoding: zstd, br, gzip' https://www.inventivashop.com | tr -d '\r' | grep -iE 'HTTP/|content-encoding|alt-svc|server'

Response :

HTTP/2 200
server: nginx
x-hosting-by: managedserver.it - Performance Managed Hosting
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
content-encoding: zstd

NGINX respond correctly using ALWAY zstd. When i use Chrome the 90% of test response in BR compression. I cannot understand why.

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.

5 participants