mirror of
https://github.com/DefectingCat/candy
synced 2025-07-15 16:51:34 +00:00
fix keep-alive default name error
This commit is contained in:
@ -9,9 +9,7 @@ port = 4000
|
||||
# index file name and format
|
||||
index = ["index.html"]
|
||||
# http keep alive timeout
|
||||
keep_alive = 75
|
||||
# http process max timeout
|
||||
process_timeout = 15
|
||||
keep_alive = 15
|
||||
[[host.route]]
|
||||
# route path: GET /
|
||||
location = "/"
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
consts::{
|
||||
host_index, insert_default_mimes, keep_alive_timeoutd_efault, mime_default, types_default,
|
||||
host_index, insert_default_mimes, keep_alive_timeout_default, mime_default, types_default,
|
||||
},
|
||||
error::Result,
|
||||
};
|
||||
@ -30,7 +30,7 @@ pub struct SettingHost {
|
||||
#[serde(default = "host_index")]
|
||||
pub index: Vec<String>,
|
||||
/// HTTP keep-alive timeout
|
||||
#[serde(default = "keep_alive_timeoutd_efault")]
|
||||
#[serde(default = "keep_alive_timeout_default")]
|
||||
pub keep_alive: u16,
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ pub fn host_index() -> Vec<String> {
|
||||
|
||||
// default http keep alive timeout
|
||||
pub const KEEP_ALIVE_TIMEOUTD_EFAULT: u16 = 75;
|
||||
pub fn keep_alive_timeoutd_efault() -> u16 {
|
||||
pub fn keep_alive_timeout_default() -> u16 {
|
||||
KEEP_ALIVE_TIMEOUTD_EFAULT
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user