Error after updating to XData version 4.17 and used TCompressMiddleware

we use Apache on linux:

The middleware TCompressMiddlerware is added to the XDataServer

XDataServerModule.AddMiddleware (TCompressMiddleware.Create);

no data are displayed in the browser. The following error message appears under the console:

Failed to load resource: net :: ERR_CONTENT_DECODING_FAILED

If no compression is used, everything works without any problems.

Any ideas where to look?

Frank

Do you use a reverse proxy? Is your Apache a "clean install" or does it have different configuration? What are the exact request and response headers of the request?

Is a standard installation with different V-Hosts and activated compression. A proxy is not used. I've tested it with several different servers with different configurations.
After disabling SSL on the server and active compression, it works too.
It also works via SSL if the header is manipulated in the browser to inactive compression.

But we don't want to operate a productive server without SSL.

  1. Request URL:
    https://xxxxxx.xx/mp-demo/OrderPortalClient.html
  2. Request Method:
    GET
  3. Status Code:
    200
  4. Remote Address:
    217.XX.XX.XX:443
  5. Referrer Policy:
    no-referrer-when-downgrade
  6. Response Headers
  7. accept-ranges:
    bytes
  8. content-encoding:
    gzip
  9. content-length:
    819
  10. content-type:
    text/html
  11. date:
    Wed, 30 Sep 2020 10:08:26 GMT
  12. etag:
    "912-5b084db999380-gzip"
  13. last-modified:
    Wed, 30 Sep 2020 09:52:30 GMT
  14. server:
    Apache/2.4.38 (Debian)
  15. status:
    200
  16. vary:
    Accept-Encoding
  17. Request Headers
  18. :authority:
    orderportal.e-vendo.de
  19. :method:
    GET
  20. :path:
    /mp-demo/OrderPortalClient.html
  21. :scheme:
    https
  22. accept:
    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
  23. accept-encoding:
    gzip, deflate, br
  24. accept-language:
    de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
  25. cache-control:
    max-age=0
  26. cookie:
    _ga=GA1.2.367503376.1543851163; _gid=GA1.2.292500809.1601392580
  27. if-modified-since:
    Wed, 30 Sep 2020 09:52:30 GMT
  28. if-none-match:
    "912-5b084db999380-gzip"
  29. referer:
    https://orderportal.e-vendo.de/mp-demo/
  30. sec-fetch-dest:
    document
  31. sec-fetch-mode:
    navigate
  32. sec-fetch-site:
    same-origin
  33. sec-fetch-user:
    ?1
  34. upgrade-insecure-requests:
    1
  35. use

Sorry, but are you returning html from a XData service operation? That doesn't look like a request to XData. Is that the failed request?

The following is the request for the request to the XDataServer to the $model:

  1. Request URL:
    https://xxxx.xx/orderportal/mp-demo/$model
  2. Request Method:
    GET
  3. Status Code:
    200
  4. Remote Address:
    217.70.131.199:443
  5. Referrer Policy:
    no-referrer-when-downgrade
  6. Response Headers
  7. access-control-allow-origin:
  8. content-encoding:
    gzip
  9. content-length:
    3274
  10. content-type:
    application/json
  11. date:
    Wed, 30 Sep 2020 12:06:11 GMT
  12. server:
    Apache/2.4.38 (Debian)
  13. status:
    200
  14. xdata-version:
    2
  15. Request Headers
  16. :authority:
    orderportal.e-vendo.de
  17. :method:
    GET
  18. :path:
    /orderportal/mp-demo/$model
  19. :scheme:
    https
  20. accept:
    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
  21. accept-encoding:
    gzip, deflate, br
  22. accept-language:
    de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
  23. cache-control:
    max-age=0
  24. cookie:
    _ga=GA1.2.367503376.1543851163; _gid=GA1.2.292500809.1601392580
  25. sec-fetch-dest:
    document
  26. sec-fetch-mode:
    navigate
  27. sec-fetch-site:
    none
  28. sec-fetch-user:
    ?1
  29. upgrade-insecure-requests:
    1
  30. user-agent:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36

This is not helping, as I don't know which of the requests are causing the error.
In any case this looks like an Apache misconfiguration.
But we need more information, the list of the requests, which one is failing, etc..
What is the exact request causing ERR_CONTENT_DECODING_FAILED error, and then what are the full details of such request? The browser shows everything, you can just copy and paste from it, either text or image.
Using Fiddler to inspect all requests in detail also helps.