Compress mime type errors without correct headers

I'm using traefik:latest (3.5.x) with docker. Traefik sits in front of a Django Rest API that runs as a separate docker container. I have a compress middleware enabled:

- "traefik.http.middlewares.compress-response.compress=true"

However, for every incoming requests that does not set "Content-Type: application/json" traefik puts out an error in the debug log:

{"level":"debug","middlewareName":"compress-response@docker","middlewareType":"Compress","error":"mime: no media type","time":"2025-07-28T23:46:01Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/compress/compress.go:142","message":"Unable to parse MIME type"}
{"level":"debug","time":"2025-07-28T23:46:01Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:175","message":"Service selected by WRR: http://172.23.0.7:8000"}

This happens for every request that does not have the header, spamming the log continously. If clients set the header, the log is quiet.

Is this something to worry about, or expected?

We found this in the middle of debugging our production API, where we are experiencing random locks, where Traefik just seems to start rejecting connections, and this is the only error information we have at the moment. Could this be a root cause for the hangs?

It's just a debug message. You can (and probably should) disable debug log level on production. I assume it's showing the error because Traefik only compresses non-compressed content, here it probably doesn't know how to handle it.

For random locks I recommend to enable and check Traefik access log in JSON format (doc).

Thanks. Just moved over to json format in the logs. Checking the outputs for anything out of the ordinary.