Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setFileToSend is fail, size is 0 #831

Closed
dreamsxin opened this issue Jul 12, 2013 · 3 comments
Closed

setFileToSend is fail, size is 0 #831

dreamsxin opened this issue Jul 12, 2013 · 3 comments

Comments

@dreamsxin
Copy link
Contributor

$filename = '/var/www/public/data/avatar.png';
$this->response->setHeader('Cache-Control', 'max-age=3600');
$this->response->setContentType('image/jpeg');
$this->response->setFileToSend($filename);
$this->response->send();
@dreamsxin
Copy link
Contributor Author

May be Same as #821

@ghost
Copy link

ghost commented Jul 12, 2013

Looks like Phalcon\Http\Response::_file property is used only in setFileToSend() in phalcon_update_property_this(this_ptr, SL("_file"), file_path TSRMLS_CC); and is never used anywhere. At least send() does not use it at all.

@ghost ghost mentioned this issue Jul 12, 2013
@dreamsxin
Copy link
Contributor Author

/home/wxservice/cphalcon/unit-tests/ResponseTest.php:202

FAILURES!
Tests: 8, Assertions: 13, Failures: 1.

@phalcon phalcon closed this as completed Jul 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant