No idea if this might cause the problem here, but I remember a case where a proxy replaced UNIX-Linfeed-Characters with Windows-Linfees&CarriageReturns. Even if either combinations of End-Of-Line should be ignored by the browser in my case it caused a 1 pixel gap between 2 rows of images.
I’d try doing a “wget” or “curl” of a tile both with and without the proxy in place, and comparing the differences. You’ll need to make sure that the OSM tile is up to date (zooming in and get a fresh tile is the easiest way of doing that) and that your cache is up to date too.
ok, it’s pretty weird but it turned out (thank you for suggesting CURL it was the key for understanding!!!) that the problem was in the content-length header, I were calculating it this way: