Merge pull request #1298 in FS/freeswitch from ~ANDYWOLK/freeswitch:bugfix/FS-10365-add-mod_http_cache-to-the-windows to master
* commit '9b1d58653ce0f225ecc16da7f45ee3c104ff27c2': FS-10365 [mod_http_cache] Add mod_http_cache to the windows build.
This commit is contained in:
commit
8102dd62e2
|
@ -1,6 +1,6 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 14
|
# Visual Studio 14
|
||||||
VisualStudioVersion = 14.0.23107.0
|
VisualStudioVersion = 14.0.25420.1
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Codecs", "Codecs", "{F881ADA2-2F1A-4046-9FEB-191D9422D781}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Codecs", "Codecs", "{F881ADA2-2F1A-4046-9FEB-191D9422D781}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -649,6 +649,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download libx264", "libs\wi
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download tiff", "libs\win32\Download tiff.2015.vcxproj", "{583D8CEA-4171-4493-9025-B63265F408D8}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download tiff", "libs\win32\Download tiff.2015.vcxproj", "{583D8CEA-4171-4493-9025-B63265F408D8}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_http_cache", "src\mod\applications\mod_http_cache\mod_http_cache.vcxproj", "{87933C2D-0159-46F7-B326-E1B6E982C21E}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
All|Win32 = All|Win32
|
All|Win32 = All|Win32
|
||||||
|
@ -2903,6 +2905,18 @@ Global
|
||||||
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|Win32.ActiveCfg = Release|Win32
|
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|Win32.Build.0 = Release|Win32
|
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|Win32.Build.0 = Release|Win32
|
||||||
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|x64.ActiveCfg = Release|Win32
|
{583D8CEA-4171-4493-9025-B63265F408D8}.Release|x64.ActiveCfg = Release|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|Win32.ActiveCfg = Release|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|Win32.Build.0 = Release|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|x64.ActiveCfg = Release|x64
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|x64.Build.0 = Release|x64
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|x64.Build.0 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -3134,5 +3148,6 @@ Global
|
||||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
{20179127-853B-4FE9-B7C0-9E817E6A3A72} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||||
{6D1BC01C-3F97-4C08-8A45-69C9B94281AA} = {C120A020-773F-4EA3-923F-B67AF28B750D}
|
{6D1BC01C-3F97-4C08-8A45-69C9B94281AA} = {C120A020-773F-4EA3-923F-B67AF28B750D}
|
||||||
{583D8CEA-4171-4493-9025-B63265F408D8} = {C120A020-773F-4EA3-923F-B67AF28B750D}
|
{583D8CEA-4171-4493-9025-B63265F408D8} = {C120A020-773F-4EA3-923F-B67AF28B750D}
|
||||||
|
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -49,6 +49,10 @@ struct curl_memory_read {
|
||||||
};
|
};
|
||||||
typedef struct curl_memory_read curl_memory_read_t;
|
typedef struct curl_memory_read curl_memory_read_t;
|
||||||
|
|
||||||
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
# define strtok_r strtok_s
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert query string parameters into string to be appended to
|
* Convert query string parameters into string to be appended to
|
||||||
* Azure authentication header
|
* Azure authentication header
|
||||||
|
|
|
@ -39,6 +39,45 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <BaseTsd.h>
|
||||||
|
typedef SSIZE_T ssize_t;
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
char *strcasestr(const char *str, const char *pattern) {
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (!*pattern)
|
||||||
|
return (char*)str;
|
||||||
|
|
||||||
|
for (; *str; str++) {
|
||||||
|
if (toupper(*str) == toupper(*pattern)) {
|
||||||
|
for (i = 1;; i++) {
|
||||||
|
if (!pattern[i])
|
||||||
|
return (char*)str;
|
||||||
|
if (toupper(str[i]) != toupper(pattern[i]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strndup(const char *s, size_t n)
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
p = (char *)malloc(n + 1);
|
||||||
|
if (p == NULL)
|
||||||
|
return NULL;
|
||||||
|
memcpy(p, s, n);
|
||||||
|
p[n] = '\0';
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 253 max domain size + '/' + NUL byte */
|
/* 253 max domain size + '/' + NUL byte */
|
||||||
#define DOMAIN_BUF_SIZE 255
|
#define DOMAIN_BUF_SIZE 255
|
||||||
|
|
||||||
|
@ -1496,10 +1535,10 @@ static switch_status_t do_config(url_cache_t *cache)
|
||||||
/* set default config */
|
/* set default config */
|
||||||
max_urls = 4000;
|
max_urls = 4000;
|
||||||
default_max_age_sec = 86400;
|
default_max_age_sec = 86400;
|
||||||
cache->location = SWITCH_PREFIX_DIR "/http_cache";
|
cache->location = switch_core_sprintf(cache->pool, "%s%s", SWITCH_GLOBAL_dirs.base_dir, "/http_cache");
|
||||||
cache->prefetch_queue_size = 100;
|
cache->prefetch_queue_size = 100;
|
||||||
cache->prefetch_thread_count = 8;
|
cache->prefetch_thread_count = 8;
|
||||||
cache->ssl_cacert = SWITCH_PREFIX_DIR "/conf/cacert.pem";
|
cache->ssl_cacert = switch_core_sprintf(cache->pool, "%s%s", SWITCH_GLOBAL_dirs.certs_dir, "/cacert.pem");
|
||||||
cache->ssl_verifyhost = 1;
|
cache->ssl_verifyhost = 1;
|
||||||
cache->ssl_verifypeer = 1;
|
cache->ssl_verifypeer = 1;
|
||||||
cache->enable_file_formats = 0;
|
cache->enable_file_formats = 0;
|
||||||
|
|
|
@ -0,0 +1,152 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>mod_http_cache</ProjectName>
|
||||||
|
<RootNamespace>mod_http_cache</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{87933C2D-0159-46F7-B326-E1B6E982C21E}</ProjectGuid>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<Import Project="$(SolutionDir)\w32\openssl.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\..\w32\module_release.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\..\w32\module_debug.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;$(SolutionDir)libs\curl-7.35.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;$(SolutionDir)\libs\curl-7.35.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;$(SolutionDir)\libs\curl-7.35.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\src\include;$(SolutionDir)\libs\curl-7.35.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="mod_http_cache.c" />
|
||||||
|
<ClCompile Include="aws.c" />
|
||||||
|
<ClCompile Include="azure.c" />
|
||||||
|
<ClCompile Include="common.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="$(SolutionDir)\libs\win32\curl\curllib.2015.vcxproj">
|
||||||
|
<Project>{87ee9da4-de1e-4448-8324-183c98dca588}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="$(SolutionDir)\libs\win32\openssl\libeay32.2015.vcxproj">
|
||||||
|
<Project>{d331904d-a00a-4694-a5a3-fcff64ab5dbe}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="$(SolutionDir)\libs\win32\openssl\ssleay32.2015.vcxproj">
|
||||||
|
<Project>{b4b62169-5ad4-4559-8707-3d933ac5db39}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="$(SolutionDir)\w32\Library\FreeSwitchCore.2015.vcxproj">
|
||||||
|
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
Loading…
Reference in New Issue