Tip using Ko-fi or Buy Me a Coffee
I was reconfiguring a nginx server to add HTTP2 support with ALPN plus add some updates to its Content Security Policy. Everything worked fine when testing and troubleshooting with Chrome. However, I ran into some problems once I tried the new changes with both Firefox and Edge as nothing rendered in the browser tabs!
A check of the Network Developer Tools showed a request header sent by Firefox, but no data was receiving. Edge and Internet Explorer are polite enough to give me an error message to help troubleshoot. But it is so generic that it doesn’t help.
The connection to the website was reset.
Error Code: INET_E_DOWNLOAD_FAILURE
After much searching in the wrong places, I discovered my problem. Turns out when using HTTP2 in Firefox, Internet Explorer and Edge you should not have any newline characters in your HTTP response headers. I had broken up my Content Security Policy over multiple lines to be more legible. But it caused these browsers to reject the new HTTP headers and terminate the HTTP connections without warning, lesson learned.
Written by Ben Garrett