grant the config setting on 502.5 page setting (#600)

grant the config setting on 502.5 page setting
This commit is contained in:
pan-wang 2018-02-21 11:27:48 -08:00 committed by GitHub
parent e3d3b088ae
commit 1f6e2c8029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -116,7 +116,7 @@ FORWARDING_HANDLER::OnExecuteRequestHandler()
if (pApplication == NULL) if (pApplication == NULL)
{ {
hr = E_INVALIDARG; hr = E_INVALIDARG;
goto Finished; goto Failure;
} }
hr = pApplication->GetProcess(&pServerProcess); hr = pApplication->GetProcess(&pServerProcess);
@ -330,7 +330,7 @@ Failure:
{ {
pResponse->SetStatus(400, "Bad Request", 0, hr); pResponse->SetStatus(400, "Bad Request", 0, hr);
} }
else else if (fFailedToStartKestrel && !m_pApplication->QueryConfig()->QueryDisableStartUpErrorPage())
{ {
HTTP_DATA_CHUNK DataChunk; HTTP_DATA_CHUNK DataChunk;
pResponse->SetStatus(502, "Bad Gateway", 5, hr, NULL, TRUE); pResponse->SetStatus(502, "Bad Gateway", 5, hr, NULL, TRUE);
@ -345,6 +345,13 @@ Failure:
DataChunk.FromMemory.BufferLength = sm_pStra502ErrorMsg.QueryCB(); DataChunk.FromMemory.BufferLength = sm_pStra502ErrorMsg.QueryCB();
pResponse->WriteEntityChunkByReference(&DataChunk); pResponse->WriteEntityChunkByReference(&DataChunk);
} }
else
{
//
// default error behavior
//
pResponse->SetStatus(502, "Bad Gateway", 3, hr);
}
// //
// Finish the request on failure. // Finish the request on failure.
// //