allowing flow app_offline to remote client (#17)

This commit is contained in:
pan-wang 2016-10-03 14:49:16 -07:00 коммит произвёл GitHub
Родитель 4ab0cdb8fa
Коммит b9fda49649
2 изменённых файлов: 36 добавлений и 13 удалений

Просмотреть файл

@ -1080,8 +1080,43 @@ VOID
if (m_pApplication->AppOfflineFound() && m_pAppOfflineHtm != NULL)
{
HTTP_DATA_CHUNK DataChunk;
PCSTR pszANCMHeader;
DWORD cchANCMHeader;
BOOL fCompletionExpected = FALSE;
HTTP_DATA_CHUNK DataChunk;
if (FAILED(m_pW3Context->GetServerVariable(STR_ANCM_CHILDREQUEST,
&pszANCMHeader,
&cchANCMHeader))) // first time failure
{
if (SUCCEEDED(hr = m_pW3Context->CloneContext(
CLONE_FLAG_BASICS | CLONE_FLAG_HEADERS | CLONE_FLAG_ENTITY,
&m_pChildRequestContext
)) &&
SUCCEEDED(hr = m_pChildRequestContext->SetServerVariable(
STR_ANCM_CHILDREQUEST,
L"1")) &&
SUCCEEDED(hr = m_pW3Context->ExecuteRequest(
TRUE, // fAsync
m_pChildRequestContext,
EXECUTE_FLAG_DISABLE_CUSTOM_ERROR, // by pass Custom Error module
NULL, // pHttpUser
&fCompletionExpected)))
{
if (!fCompletionExpected)
{
retVal = RQ_NOTIFICATION_CONTINUE;
}
else
{
retVal = RQ_NOTIFICATION_PENDING;
}
goto Finished;
}
//
// fail to create child request, fall back to default 502 error
//
}
DataChunk.DataChunkType = HttpDataChunkFromMemory;
DataChunk.FromMemory.pBuffer = (PVOID)m_pAppOfflineHtm->m_Contents.QueryStr();

Просмотреть файл

@ -1,12 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// This file is auto-generated
#define FileVersion 7,1,1968,0
#define FileVersionStr "7.1.1968.0\0"
#define ProductVersion 7,1,1968,0
#define ProductVersionStr "7.1.1968.0\0"
#define PlatformToolset "v140\0"