http.conf add parameter http.multi_range.enabed
parent
7042f8d061
commit
712d9010d7
3
HISTORY
3
HISTORY
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
Version 5.11 2017-05-25
|
||||
Version 5.11 2017-05-26
|
||||
* bug fixed: file_offset has no effect when use trunk file
|
||||
* add storage access log header
|
||||
* http.conf add parameter http.multi_range.enabed
|
||||
|
||||
Version 5.10 2017-03-29
|
||||
* use fc_safe_read instead of read, and fc_safe_write instead of write
|
||||
|
|
|
|||
|
|
@ -124,6 +124,10 @@ int fdfs_http_params_load(IniContext *pIniContext, \
|
|||
"http.need_find_content_type", \
|
||||
pIniContext, true);
|
||||
|
||||
pParams->support_multi_range = iniGetBoolValue(NULL, \
|
||||
"http.multi_range.enabed", \
|
||||
pIniContext, true);
|
||||
|
||||
pParams->server_port = iniGetIntValue(NULL, "http.server_port", \
|
||||
pIniContext, 80);
|
||||
if (pParams->server_port <= 0)
|
||||
|
|
@ -137,7 +141,8 @@ int fdfs_http_params_load(IniContext *pIniContext, \
|
|||
pParams->anti_steal_token = iniGetBoolValue(NULL, \
|
||||
"http.anti_steal.check_token", \
|
||||
pIniContext, false);
|
||||
if (pParams->need_find_content_type || pParams->anti_steal_token)
|
||||
if (pParams->need_find_content_type || pParams->anti_steal_token ||
|
||||
pParams->support_multi_range)
|
||||
{
|
||||
mime_types_filename = iniGetStrValue(NULL, "http.mime_types_filename", \
|
||||
pIniContext);
|
||||
|
|
@ -275,7 +280,7 @@ int fdfs_http_params_load(IniContext *pIniContext, \
|
|||
return result;
|
||||
}
|
||||
|
||||
if (!pParams->need_find_content_type)
|
||||
if (!(pParams->need_find_content_type || pParams->support_multi_range))
|
||||
{
|
||||
hash_destroy(&pParams->content_type_hash);
|
||||
}
|
||||
|
|
@ -294,7 +299,7 @@ int fdfs_http_params_load(IniContext *pIniContext, \
|
|||
|
||||
void fdfs_http_params_destroy(FDFSHTTPParams *pParams)
|
||||
{
|
||||
if (pParams->need_find_content_type)
|
||||
if (!(pParams->need_find_content_type || pParams->support_multi_range))
|
||||
{
|
||||
hash_destroy(&pParams->content_type_hash);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ typedef struct
|
|||
/* if need find content type by file extension name */
|
||||
bool need_find_content_type;
|
||||
|
||||
/* if support multi range */
|
||||
bool support_multi_range;
|
||||
|
||||
/* the web server port */
|
||||
int server_port;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,3 +24,6 @@ http.anti_steal.secret_key=FastDFS1234567890
|
|||
# default value is empty (no file sepecified)
|
||||
http.anti_steal.token_check_fail=/home/yuqing/fastdfs/conf/anti-steal.jpg
|
||||
|
||||
# if support multi regions for HTTP Range
|
||||
# default value is true
|
||||
http.multi_range.enabed = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue