chriso/klein.php — pull request #18 by berklee (2011-10-11 12:36:18+00:00)
Title: Changed fpassthru() to readfile() in $response->file() on line 412.

Changed fpassthru($path) to readfile($path) on line 412 in $response->file() because fpassthru() expects a file handle instead of a string. Readfile() handles a string correctly.

===========

Hello Chris,

I've been using klein.php for a day or two, and I wanted to use the file sending functionality. But I couldn't get it to work because fpassthru() expects a file handle instead of a string. So I changed it to use readfile() instead.

If you want, I can also add some code to override the MIME type, because that would be handy as well. Let me know if you'd appreciate that and I'll send you a new pull request with that functionality.

Anyway, thanks for the great library!

Regards,
Berklee