Is it maybe because you are only reading one line from the file, and then sending it? Try outputting the line you read from the file, and see what it is you are sending. Also, is that really all the contents of the file you want to send, or is some of it the response you are looking for?
turns off the line separator, so the whole file goes into variable $respmod.
If I print this it is exactly the same as the file contents. And yes, I do want to include those response headers (these are used in the ICAP response modification.)