With the undefs, I just didn't want a possibility of a carryover buffer of HTML sent back to the client on a zero-length file, but I should just re-initialize them.
will do
I haven't had any zero-length files on the server though. As far as the file-length is concerned, you can see in the server output that between 23-24K are read from the document and supposedly sent back to the client.