What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

前端 未结 22 2769
無奈伤痛
無奈伤痛 2020-12-01 02:24

I\'m currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Chrome. I\'m not sure exactly what can provoke this erro

22条回答
  •  无人及你
    2020-12-01 03:05

    We experienced this problem on pages with long Base64 strings. The problem occurs because we use CloudFlare.

    Details: https://community.cloudflare.com/t/err-http2-protocol-error/119619.

    Key section from the forum post:

    After further testing on Incognito tabs on multiple browsers, then doing the changes on the code from a BASE64 to a real .png image, the issue never happened again, in ANY browser. The .png had around 500kb before becoming a base64,so CloudFlare has issues with huge lines of text on same line (since base64 is a long string) as a proxy between the domain and the heroku. As mentioned before, directly hitting Heroku url also never happened the issue.

    The temporary hack is to disable HTTP/2 on CloudFlare.

    Hope someone else can produce a better solution that doesn't require disabling HTTP/2 on CloudFlare.

提交回复
热议问题