# How a client http request can damage server-side PDF file?



## sgm (Sep 29, 2010)

Hi everybody!

I've got a very strange trouble - even Google can't help me solve it.
I have:
FreeBSD 7.2 Stable + Apache/2.2.14/nginx/0.7.64 server

Uploaded on any virtual host pdf-file

I know, it sounds insane, but
while requesting from several windows-based pc's through Firefox 3.61 for opening this file as application/pdf - the file "breaks" - its md5 changes, parts of pdf-file becomes unreadable. String to string comparison of it in text mode shows that difference is between newlines in it - somewhere they are added and somewhere are removed in the damaged file.

For sure, there is absolutely no possibility for client machine to modify server-side files directly. We tried:
- Setting different permissions for the file, including 444 - not worked.
- HDD is absolutely ok - we tried to move system on a new one.
- File damages, but it's date of modification don't change.
- File damages immediately after browser requests it.
- If we change pdf files mime type at server side so it opens as text - file remains undamaged while being requested that way.

What could it ever be?


----------

