资源简介
fastdfs-nginx-module-master
代码片段和文件信息
/**
* Copyright (C) 2008 Happy Fish / YuQing
*
* FastDFS may be copied only under the terms of the GNU General
* Public License V3 which may be found in the FastDFS source kit.
* Please visit the FastDFS Home Page http://www.csource.org/ for more detail.
**/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “fdfs_define.h“
#include “logger.h“
#include “shared_func.h“
#include “fdfs_global.h“
#include “sockopt.h“
#include “http_func.h“
#include “fdfs_http_shared.h“
#include “fdfs_client.h“
#include “local_ip_func.h“
#include “fdfs_shared_func.h“
#include “trunk_shared.h“
#include “common.h“
#define FDFS_MOD_REPONSE_MODE_PROXY ‘P‘
#define FDFS_MOD_REPONSE_MODE_REDIRECT ‘R‘
#define FDFS_CONTENT_TYPE_TAG_STR “Content-type: “
#define FDFS_CONTENT_TYPE_TAG_LEN (sizeof(FDFS_CONTENT_TYPE_TAG_STR) - 1)
#define FDFS_CONTENT_RANGE_TAG_STR “Content-range: “
#define FDFS_CONTENT_RANGE_TAG_LEN (sizeof(FDFS_CONTENT_RANGE_TAG_STR) - 1)
static char flv_header[] = “FLV\x1\x1\0\0\0\x9\0\0\0\x9“;
#define FDFS_RANGE_LENGTH(range) ((range.end - range.start) + 1)
typedef struct tagGroupStorePaths {
char group_name[FDFS_GROUP_NAME_MAX_LEN + 1];
int group_name_len;
int storage_server_port;
FDFSStorePaths store_paths;
} GroupStorePaths;
static int storage_server_port = FDFS_STORAGE_SERVER_DEF_PORT;
static int my_group_name_len = 0;
static int group_count = 0; //for multi groups
static bool url_have_group_name = false;
static bool use_storage_id = false;
static bool flv_support = false; //if support flv
static char flv_extension[FDFS_FILE_EXT_NAME_MAX_LEN + 1] = {0}; //flv extension name
static int flv_ext_len = 0; //flv extension length
static char my_group_name[FDFS_GROUP_NAME_MAX_LEN + 1] = {0};
static char response_mode = FDFS_MOD_REPONSE_MODE_PROXY;
static GroupStorePaths *group_store_paths = NULL; //for multi groups
static FDFSHTTPParams g_http_params;
static int storage_sync_file_max_delay = 24 * 3600;
static int fdfs_get_params_from_tracker();
static int fdfs_format_http_datetime(time_t t char *buff const int buff_size);
static int fdfs_strtoll(const char *s int64_t *value)
{
char *end = NULL;
*value = strtoll(s &end 10);
if (end != NULL && *end != ‘\0‘)
{
return EINVAL;
}
return 0;
}
static int fdfs_load_groups_store_paths(IniContext *pItemContext)
{
char section_name[64];
char *pGroupName;
int bytes;
int result;
int i;
bytes = sizeof(GroupStorePaths) * group_count;
group_store_paths = (GroupStorePaths *)malloc(bytes);
if (group_store_paths == NULL)
{
logError(“file: “__FILE__“ line: %d “ \
“malloc %d bytes fail “ \
“errno: %d error info: %s“ \
__LINE__ bytes errno STRERROR(errno));
return errno != 0 ? errno : ENOMEM;
}
for (i=0; i {
sprintf(section_name “group%d“ i + 1);
pGro
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-30 01:57 fastdfs-nginx-module-master\
文件 2804 2017-05-30 01:57 fastdfs-nginx-module-master\HISTORY
文件 1722 2017-05-30 01:57 fastdfs-nginx-module-master\INSTALL
目录 0 2017-05-30 01:57 fastdfs-nginx-module-master\src\
文件 43398 2017-05-30 01:57 fastdfs-nginx-module-master\src\common.c
文件 3987 2017-05-30 01:57 fastdfs-nginx-module-master\src\common.h
文件 902 2017-05-30 01:57 fastdfs-nginx-module-master\src\config
文件 3725 2017-05-30 01:57 fastdfs-nginx-module-master\src\mod_fastdfs.conf
文件 28668 2017-05-30 01:57 fastdfs-nginx-module-master\src\ngx_http_fastdfs_module.c
- 上一篇:基于LabVIEW的Socket程序设计
- 下一篇:实时时钟代码
相关资源
- nginx视频教程
- Nginx服务打包插件winsw
- nginx 1.11.13 安装包
- windows_nginx_log 日志分割
- nginx安装与配置详细资料+weblogic集群配
- linux安装nginx一键脚本自己用过
- nginx-1.10.3-1.el7.ngx.x86_64.rpm
- cut_log.sh
- nginx三套视频教程
- nginx转发sftp、ftp的配置
- nginx-1.8.1.tar.gz
- Nginx安装url_hash插件.doc
- 安装nginx必备rpm
- nginx-upstream-jvm-route-0.1.tar.gz
- 分布式电商项目尚硅谷徐靖博18年最新
- 深入理解nginx.pdf
- Nginx开发从入门到精通版 超清晰
- fastdfs+nginx 分布式存储图片,支持动态
- windows下搭建基于nginx的rtmp服务器
- centos7下安装nginx(有网以及没有网络
- nginx-1.2.6.tar.gz
- nginx-1.10.3.tar.gz
- 把Nginx创建为Windows服务的winsw-1.8-bin
- nginx最新win64位
- nginx-rtmp-win32搭建流媒体服务器,支持
- nginx+waf的配置
-
Windows环境下用jwpla
yer+Nginx搭建视频 - Nginx 同IP 多域名 HTTPS SSL 配置
- Windows下编译Nginx并添加模块.docx
- ngx_lua_module-windows-1.1.2.0
评论
共有 条评论