Today I ran into a serious problem: Apache before the response body attributes 3-4 extra bytes, which, at first glance, do not carry any semantic load.
For html content, this does not represent a problem - everything is rendered as it should, but for more sensitive xml, a problem has arisen: the reading script is confused in the encoding (((
The first thought - about the unicode BOM - was not confirmed. A file recoded in windows-1251 is rendered in the same way.
Non-php files - tried txt, xml - given without problems.
I suspect that the matter may be in the configuration of the web server, but I don’t know where to dig.
I really hope for the help of the collective mind.
Thanks in advance to everyone!
UPD:
Here the problem can be seen more clearly:
for93t.users.ru/demo/3bytes.html')
SOLUTION:
A sea of thanks to the esteemed don
p0is0n !
The problem was resolved by adding an additional Content-Length header with the correct value.