API download PDF cause ERR_HTTP2_PROTOCOL_ERROR in chrome but working in firefox

What is the name of the domain?

example.com

What is the error message?

This site can’t be reached. ERR_HTTP2_PROTOCOL_ERROR

What is the issue you’re encountering

My website has an API that allows people to download PDF files. However, users using the Chrome browser cannot download files; instead, they receive a ‘This site can’t be reached’ message from Chrome. When I switch to the Firefox browser or change the IP address to the origin IP, both solutions work.

Screenshot of the error

Hi,

Thank you for reaching out to us. I’m sorry that you’re experiencing issues, but I’ll be glad to assist you.

According to our documentation here: Troubleshooting other errors · Cloudflare Support docs

Requests proxied by Cloudflare may result with an error for the visitors with ERR_HTTP2_PROTOCOL_ERROR visible in the Developer Tools Console. These errors are usually due to an issue on the origin web server configuration, but might only materialize when requests are proxied by Cloudflare depending on the client browser’s behavior.

A malformed HTTP response header on the origin web server.

Resolution: Make a request directly to your origin server and take a look at the HTTP response headers and see if you can see anything that looks abnormal. Make sure that the field values are respecting the following requirements: RFC 9110, RFC 9113 and RFC 5234.

A compression issue, for example the origin server is serving gzip encoded compressed content but is not updating the content-length header, or the origin is serving broken gzip compressed content.

Resolution: In this case you can try to disable compression at your origin and rely on Cloudflare to compress content You can also investigate the configuration of your origin server to make sure the compression is working as expected.

Can you please try disabling HTTP/2 To Origin:

Please let us know if you have further questions.

Thanks for your reply Lili,
I have another question.
Since I migrated our website to CF, my client has had a bad experience due to latency (referring to the image I uploaded below).
Do you suggest any solutions to improve latency in this case?
Our data center is located in Hanoi, Vietnam. I have already turned on Optimization suggestions from CF, Tiered Cache, but perhaps distance is the main problem here, as far as I know

This topic was automatically closed after 15 days. New replies are no longer allowed.