Skip to content

Commit 73419bd

Browse files
committed
nits
1 parent be46174 commit 73419bd

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/StartupExceptionApplication.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class StartupExceptionApplication : public InProcessApplicationBase
1616
HINSTANCE moduleInstance,
1717
BOOL disableLogs,
1818
HRESULT hr,
19-
const std::vector<byte>& errorPageContent
19+
std::vector<byte>&& errorPageContent
2020
)
2121
: m_disableLogs(disableLogs),
2222
m_HR(hr),
2323
m_moduleInstance(moduleInstance),
24-
m_errorPageContent(errorPageContent),
24+
m_errorPageContent(std::move(errorPageContent)),
2525
InProcessApplicationBase(pServer, pApplication)
2626
{
2727
}

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ CreateApplication(
129129
std::unique_ptr<InProcessOptions> options;
130130
THROW_IF_FAILED(InProcessOptions::Create(*pServer, pSite, *pHttpApplication, options));
131131
// Set the currently running application to a fake application that returns startup exceptions.
132-
auto pErrorApplication = std::make_unique<StartupExceptionApplication>(*pServer, *pHttpApplication, g_hServerModule, options->QueryDisableStartUpErrorPage(), hr, g_errorPageContent);
132+
auto pErrorApplication = std::make_unique<StartupExceptionApplication>(*pServer, *pHttpApplication, g_hServerModule, options->QueryDisableStartUpErrorPage(), hr, std::move(g_errorPageContent));
133133

134134
RETURN_IF_FAILED(pErrorApplication->StartMonitoringAppOffline());
135135
*ppApplication = pErrorApplication.release();

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ typedef BOOL(WINAPI * PFN_SHUTDOWN_HANDLER) (void* pvShutdownHandlerContext);
1515
typedef REQUEST_NOTIFICATION_STATUS(WINAPI * PFN_ASYNC_COMPLETION_HANDLER)(void *pvManagedHttpContext, HRESULT hrCompletionStatus, DWORD cbCompletion);
1616
typedef void(WINAPI * PFN_REQUESTS_DRAINED_HANDLER) (void* pvShutdownHandlerContext);
1717

18-
1918
#define DOTNETCORE_STARTUP_HOOK L"DOTNET_STARTUP_HOOKS"
2019
#define ASPNETCORE_STARTUP_ASSEMBLY L"Microsoft.AspNetCore.Server.IIS"
2120
class IN_PROCESS_APPLICATION : public InProcessApplicationBase

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/managedexports.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ EXTERN_C __MIDL_DECLSPEC_DLLEXPORT
511511
VOID
512512
http_set_startup_error_page_content(_In_ byte* errorPageContent, int length)
513513
{
514-
g_errorPageContent.resize(g_errorPageContent.size() + length);
515-
memcpy(&g_errorPageContent[g_errorPageContent.size() - length], errorPageContent, length);
514+
g_errorPageContent.resize(length);
515+
memcpy(&g_errorPageContent[length], errorPageContent, length);
516516
}
517517

518518
// End of export

0 commit comments

Comments
 (0)