1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 09:57:14 +01:00
SqMod/vendor/POCO/ApacheConnector/src/ApacheServerRequest.cpp
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

67 lines
1.2 KiB
C++

//
// ApacheServerRequest.cpp
//
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "ApacheServerRequest.h"
#include "ApacheServerResponse.h"
#include "ApacheRequestHandlerFactory.h"
#include "Poco/Exception.h"
#include <set>
ApacheServerRequest::ApacheServerRequest(
ApacheRequestRec* pApacheRequest,
const char* serverName,
int serverPort,
const char* clientName,
int clientPort):
_pApacheRequest(pApacheRequest),
_pResponse(0),
_pStream(new ApacheInputStream(_pApacheRequest)),
_serverAddress(serverName, serverPort),
_clientAddress(clientName, clientPort)
{
}
ApacheServerRequest::~ApacheServerRequest()
{
delete _pStream;
}
const Poco::Net::HTTPServerParams& ApacheServerRequest::serverParams() const
{
throw Poco::NotImplementedException("No HTTPServerParams available in Apache modules.");
}
Poco::Net::HTTPServerResponse& ApacheServerRequest::response() const
{
return *_pResponse;
}
void ApacheServerRequest::setResponse(ApacheServerResponse* pResponse)
{
_pResponse = pResponse;
}
bool ApacheServerRequest::expectContinue() const
{
return false;
}
bool ApacheServerRequest::secure() const
{
return _pApacheRequest->secure();
}