mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
missing include <memory>
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This is unpublished proprietary source code of Applied Informatics.
|
// This is unpublished proprietary source code of Applied Informatics.
|
||||||
// The contents of this file may not be disclosed to third parties,
|
// The contents of this file may not be disclosed to third parties,
|
||||||
// copied or duplicated in any form, in whole or in part.
|
// copied or duplicated in any form, in whole or in part.
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "http_request.h"
|
#include "http_request.h"
|
||||||
#include "util_filter.h"
|
#include "util_filter.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using Poco::Net::HTTPServerRequest;
|
using Poco::Net::HTTPServerRequest;
|
||||||
using Poco::Net::HTTPServerResponse;
|
using Poco::Net::HTTPServerResponse;
|
||||||
@@ -160,39 +161,39 @@ extern "C" int ApacheConnector_handler(request_rec *r)
|
|||||||
{
|
{
|
||||||
ApacheRequestRec rec(r);
|
ApacheRequestRec rec(r);
|
||||||
ApacheApplication& app(ApacheApplication::instance());
|
ApacheApplication& app(ApacheApplication::instance());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// ensure application is ready
|
// ensure application is ready
|
||||||
app.setup();
|
app.setup();
|
||||||
|
|
||||||
// if the ApacheRequestHandler declines handling - we stop
|
// if the ApacheRequestHandler declines handling - we stop
|
||||||
// request handling here and let other modules do their job!
|
// request handling here and let other modules do their job!
|
||||||
if (!app.factory().mustHandle(r->uri))
|
if (!app.factory().mustHandle(r->uri))
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
|
|
||||||
apr_status_t rv;
|
apr_status_t rv;
|
||||||
if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)))
|
if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
std::auto_ptr<ApacheServerRequest> pRequest(new ApacheServerRequest(
|
std::auto_ptr<ApacheServerRequest> pRequest(new ApacheServerRequest(
|
||||||
&rec,
|
&rec,
|
||||||
r->connection->local_ip,
|
r->connection->local_ip,
|
||||||
r->connection->local_addr->port,
|
r->connection->local_addr->port,
|
||||||
r->connection->remote_ip,
|
r->connection->remote_ip,
|
||||||
r->connection->remote_addr->port));
|
r->connection->remote_addr->port));
|
||||||
|
|
||||||
std::auto_ptr<ApacheServerResponse> pResponse(new ApacheServerResponse(pRequest.get()));
|
std::auto_ptr<ApacheServerResponse> pResponse(new ApacheServerResponse(pRequest.get()));
|
||||||
|
|
||||||
// add header information to request
|
// add header information to request
|
||||||
rec.copyHeaders(*pRequest);
|
rec.copyHeaders(*pRequest);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRequestHandler> pHandler(app.factory().createRequestHandler(*pRequest));
|
std::auto_ptr<HTTPRequestHandler> pHandler(app.factory().createRequestHandler(*pRequest));
|
||||||
|
|
||||||
if (pHandler.get())
|
if (pHandler.get())
|
||||||
{
|
{
|
||||||
pHandler->handleRequest(*pRequest, *pResponse);
|
pHandler->handleRequest(*pRequest, *pResponse);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -260,25 +261,25 @@ extern "C" const char* ApacheConnector_config(cmd_parms *cmd, void *in_dconf, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" const command_rec ApacheConnector_cmds[] =
|
extern "C" const command_rec ApacheConnector_cmds[] =
|
||||||
{
|
{
|
||||||
AP_INIT_RAW_ARGS(
|
AP_INIT_RAW_ARGS(
|
||||||
"AddPocoRequestHandler",
|
"AddPocoRequestHandler",
|
||||||
reinterpret_cast<cmd_func>(ApacheConnector_uris),
|
reinterpret_cast<cmd_func>(ApacheConnector_uris),
|
||||||
NULL,
|
NULL,
|
||||||
RSRC_CONF,
|
RSRC_CONF,
|
||||||
"POCO RequestHandlerFactory class name followed by shared library path followed by a list of ' ' separated URIs that must be handled by this module."),
|
"POCO RequestHandlerFactory class name followed by shared library path followed by a list of ' ' separated URIs that must be handled by this module."),
|
||||||
AP_INIT_RAW_ARGS(
|
AP_INIT_RAW_ARGS(
|
||||||
"AddPocoConfig",
|
"AddPocoConfig",
|
||||||
reinterpret_cast<cmd_func>(ApacheConnector_config),
|
reinterpret_cast<cmd_func>(ApacheConnector_config),
|
||||||
NULL,
|
NULL,
|
||||||
RSRC_CONF,
|
RSRC_CONF,
|
||||||
"Path of the POCO configuration file."),
|
"Path of the POCO configuration file."),
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
module AP_MODULE_DECLARE_DATA poco_module =
|
module AP_MODULE_DECLARE_DATA poco_module =
|
||||||
{
|
{
|
||||||
STANDARD20_MODULE_STUFF,
|
STANDARD20_MODULE_STUFF,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user