Skip to content

Commit

Permalink
・local.ptronへの$JUMPが$RDIR相当になっていたのを修正 #60
Browse files Browse the repository at this point in the history
・受信ヘッダフィルターで$TYPEが使えなくなっていたのを修正 #58
・コンパイル環境をVisualStudio 2019へ更新
・wolfSSLのバージョンを v4.0.0 へ更新
  • Loading branch information
amate committed May 3, 2019
1 parent 6255613 commit ea75201
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -37,7 +37,6 @@ icu/
srell/
GnuTLS*/
mingw/
wolfssl/
/wolfssl
packages/
Test/
Expand Down
2 changes: 1 addition & 1 deletion Proxydomo/AppConst.h
Expand Up @@ -39,7 +39,7 @@
#endif

/// アプリケーションのバージョン
#define APP_VERSION _T("1.107")
#define APP_VERSION _T("1.108")



Expand Down
14 changes: 7 additions & 7 deletions Proxydomo/Proxydomo.vcxproj
Expand Up @@ -28,44 +28,44 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{DDADC3EE-73B1-4DED-9073-F4AF4755B6D4}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
Expand Down
9 changes: 7 additions & 2 deletions Proxydomo/RequestManager.cpp
Expand Up @@ -987,9 +987,11 @@ bool CRequestManager::_HandleLocalPtron()
m_filterOwner.rdirToHost = m_filterOwner.url.getUrl();
}
if (CUtil::noCaseBeginsWith(L"http://local.ptron", m_filterOwner.rdirToHost)) {
m_filterOwner.rdirToHost = L"http://file//./html" + CUrl(m_filterOwner.rdirToHost).getPath();
WARN_LOG << L"rdirToHost is local.ptron : " << m_filterOwner.rdirToHost;
//m_filterOwner.rdirToHost = L"http://file//./html" + CUrl(m_filterOwner.rdirToHost).getPath();
}


// https://local.ptron/ への接続
if (CSettings::s_SSLFilter && CUtil::noCaseBeginsWith(L"https://local.ptron", m_filterOwner.rdirToHost)) {
wstring subpath;
Expand Down Expand Up @@ -1406,10 +1408,13 @@ void CRequestManager::_ProcessIn()
m_filterOwner.bypassBody = true;
}

std::string contentType = UTF8fromUTF16(m_filterOwner.GetHeader(m_filterOwner.inHeaders, L"Content-Type"));
_VerifyContentType(contentType);

// Filter incoming headers
_ProcessInHeaderFilter();

std::string contentType = UTF8fromUTF16(m_filterOwner.GetHeader(m_filterOwner.inHeadersFiltered, L"Content-Type"));
contentType = UTF8fromUTF16(m_filterOwner.GetHeader(m_filterOwner.inHeadersFiltered, L"Content-Type"));
if (contentType.size() > 0) {
// If size is not given, we'll read body until connection closes
if (contentLength.empty() && m_requestLine.method != "HEAD")
Expand Down

0 comments on commit ea75201

Please sign in to comment.