Score:0

nginx, HTTP/2, zero-length files

za flag

After an update of Centos 7.2 to 7.9 an HTTP/2-enabled vhost/site started to behave weirdly: random js/ccs files are downloaded in the browser as zero-length empty ones, but with 200 status.

I cannot reproduce this in curl using --http2 switch (seems that this has something to do with complicated browser cipher/policy algos), but this is reproducible across several client machines and browsers. Nginx reports no errors in logs. What is even more weird, is that nginx reports that body_bytes_sent isn't zero for browser requests that got zero-length files on browser side, and that length is just the same that it should be.

I realize this question looks as a "lame zero disgnostic question from guy with 1 karma" but this is really all the diagnostics what I can get. So far the workaround for me is to disable HTTP/2 in nginx. This is devastating since this is the first issue of this kind to my knowledge that I cannot ged rid of.

So... may be some of the community members has seen something similar ?

jp flag
Check server response headers from browser dev tools.
drookie avatar
za flag
Oh, I did - 200 and zero bytes. Furthermore, some browsers complains about the connection being reset, but none of this in the server logs.
jp flag
Could be this one https://trac.nginx.org/nginx/ticket/1250
drookie avatar
za flag
Thanks a lot ! Made my day - this was it indeed.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.