Traefik v3 compression middleware behavior change

We just discovered the new behavior of the http compression middleware in Traefik v3.

In particular, this:

If the Accept-Encoding request header is absent, it is meant as br compression is requested.

We found that this behavior breaks curl (at least, as of version 7.81) unless the --compression flag is added. What happens is that curl does not add the "Accept-Encoding" header, yet traefik sends a br-encoded response. Curl then does not properly decompress the response and will output the br-compressed response.

I'm posting this here instead of as a github issue because the behavior is documented (although not noted in the migration guide). But I have concerns due to the ubiquity of curl and the potential for client breakage such as what we encountered.

Thoughts?

Thanks,
Joe

1 Like

I just found this issue on github: compress midddleware: dont encode content if Accept-Encoding header is missing · Issue #9734 · traefik/traefik · GitHub so it does seem like others have run into it as well.