add content_length configuration

pull/433/head
juneszh 4 years ago committed by GitHub
parent 32f7c8dbe4
commit c649964d95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -141,6 +141,7 @@ class Engine {
$this->set('flight.log_errors', false); $this->set('flight.log_errors', false);
$this->set('flight.views.path', './views'); $this->set('flight.views.path', './views');
$this->set('flight.views.extension', '.php'); $this->set('flight.views.extension', '.php');
$this->set('flight.content_length', true);
// Startup configuration // Startup configuration
$this->before('start', function() use ($self) { $this->before('start', function() use ($self) {
@ -152,6 +153,8 @@ class Engine {
// Set case-sensitivity // Set case-sensitivity
$self->router()->case_sensitive = $self->get('flight.case_sensitive'); $self->router()->case_sensitive = $self->get('flight.case_sensitive');
// Set Content-Length
$self->response()->content_length = $self->get('flight.content_length');
}); });
$initialized = true; $initialized = true;

Loading…
Cancel
Save