v0.29.2
This commit is contained in:
1 parent
76cb4acef0
commit
68678e98be
84 files changed
+1519
-325
No files matched your search
@@ -242,11 +242,14 @@ impl Service {
|
||||
);
|
||||
self.php.custom_params = normalize_fastcgi_params(std::mem::take(&mut self.php.custom_params))?;
|
||||
self.php.php_values = normalize_php_values(std::mem::take(&mut self.php.php_values))?;
|
||||
self.php.php_admin_values = normalize_php_values(std::mem::take(&mut self.php.php_admin_values))?;
|
||||
ensure!(!self.php.php_values.keys().any(|key| self.php.php_admin_values.contains_key(key)), "PHP_VALUE and PHP_ADMIN_VALUE must not define the same directive");
|
||||
let php_custom_bytes = self
|
||||
.php
|
||||
.custom_params
|
||||
.iter()
|
||||
.chain(self.php.php_values.iter())
|
||||
.chain(self.php.php_admin_values.iter())
|
||||
.map(|(name, value)| name.len() + value.len() + 2)
|
||||
.sum::<usize>();
|
||||
ensure!(
|
||||
@@ -350,6 +353,7 @@ impl Service {
|
||||
let php = if self.php.enabled {
|
||||
Some(CompiledPhp {
|
||||
extensions: self.php.extensions.iter().cloned().collect(),
|
||||
path_info: self.php.path_info,
|
||||
endpoint: FastCgiEndpoint::parse(&self.php.endpoint)?,
|
||||
connect_timeout: Duration::from_millis(self.php.connect_timeout_ms),
|
||||
request_timeout: Duration::from_millis(self.php.request_timeout_ms),
|
||||
@@ -360,11 +364,14 @@ impl Service {
|
||||
stderr_log_bytes: self.php.stderr_log_bytes,
|
||||
custom_params: self.php.custom_params.clone(),
|
||||
php_values: self.php.php_values.clone(),
|
||||
php_admin_values: self.php.php_admin_values.clone(),
|
||||
metrics: Arc::new(crate::web_server::metrics::PhpMetrics::default()),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
Ok(CompiledService {
|
||||
web_metrics: Arc::new(crate::web_server::metrics::PhpMetrics::default()),
|
||||
id: self.id.clone(),
|
||||
name: self.name.clone(),
|
||||
root,
|
||||
|
||||
Reference in new issue
Block a user