Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed Jul 6, 2022
1 parent 191cbdc commit e2dc1ca
Show file tree
Hide file tree
Showing 1,343 changed files with 23,647 additions and 23,647 deletions.
2 changes: 1 addition & 1 deletion ActiveRecord/Compiler/Compiler.progen
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ vc.project.compiler.defines =
vc.project.compiler.defines.shared =
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
vc.project.linker.dependencies =
vc.project.linker.dependencies =
vc.solution.create = true
32 changes: 16 additions & 16 deletions ApacheConnector/doc/ApacheConnectorUserGuide.page
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ file (usually <[httpd.conf]>):

LoadModule poco_module modules/mod_pocod.so
----

!!!Configuring ApacheConnector
ApacheConnector must be able to find shared libraries containing request handler, as well
as optional configuration files. ApacheConnector provides an Poco::Util::Application class
Expand All @@ -30,15 +30,15 @@ is used in the Apache configuration file:

AddPocoRequestHandler <FactoryClass> <SharedLibrary> <Path>...
----

The first argument specifies the name of the request handler factory class. The second argument
contains the path of the shared library containing the request handler.
The third (and optionally following) argument(s) specify the URI paths handled by the
request handler. For example:

AddPocoRequestHandler TimeRequestHandlerFactory p:/Poco/ApacheConnector/samples/TimeServer/bin/TimeServerd.dll /time
----

loads the TimeRequestHandlerFactory from TimeServerd.dll. Whenever a request for a URI starting with "/time"
is sent by a client, this request will be handled by the TimeRequestHandler.

Expand Down Expand Up @@ -76,33 +76,33 @@ Following is a sample for a request handler implementation. The complete sample
#include "Poco/DateTimeFormatter.h"
#include "Poco/DateTimeFormat.h"
#include "Poco/ClassLibrary.h"


using Poco::Net::HTTPRequestHandler;
using Poco::Net::HTTPRequestHandlerFactory;
using Poco::Net::HTTPServerRequest;
using Poco::Net::HTTPServerResponse;
using Poco::Timestamp;
using Poco::DateTimeFormatter;
using Poco::DateTimeFormat;


class TimeRequestHandler: public HTTPRequestHandler
/// Return a HTML document with the current date and time.
{
public:
TimeRequestHandler()
TimeRequestHandler()
{
}

void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
{
Timestamp now;
std::string dt(DateTimeFormatter::format(now, DateTimeFormat::SORTABLE_FORMAT));

response.setChunkedTransferEncoding(true);
response.setContentType("text/html");

std::ostream& ostr = response.send();
ostr << "<html><head><title>TimeServer powered by POCO ApacheConnector</title>";
ostr << "<meta http-equiv=\"refresh\" content=\"1\"></head>";
Expand All @@ -111,22 +111,22 @@ Following is a sample for a request handler implementation. The complete sample
ostr << "</p></body></html>";
}
};


class TimeRequestHandlerFactory: public HTTPRequestHandlerFactory
{
public:
TimeRequestHandlerFactory()
{
}

HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
{
return new TimeRequestHandler;
}
};


POCO_BEGIN_MANIFEST(HTTPRequestHandlerFactory)
POCO_EXPORT_CLASS(TimeRequestHandlerFactory)
POCO_END_MANIFEST
Expand Down
2 changes: 1 addition & 1 deletion ApacheConnector/include/ApacheConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ApacheRequestRec
public:
ApacheRequestRec(request_rec* _pRec);
/// Creates the ApacheRequestRec;

bool haveRequestBody();
/// Returns true if the request contains a body.

Expand Down
2 changes: 1 addition & 1 deletion ApacheConnector/include/ApacheRequestHandlerFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ApacheRequestHandlerFactory: public Poco::Net::HTTPRequestHandlerFactory

private:
typedef std::map<std::string, Poco::Net::HTTPRequestHandlerFactory*> RequestHandlerFactories;

RequestHandlerFactories _requestHandlers;
Poco::ClassLoader<Poco::Net::HTTPRequestHandlerFactory> _loader;
Poco::FastMutex _mutex;
Expand Down
12 changes: 6 additions & 6 deletions ApacheConnector/include/ApacheServerRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class ApacheServerRequest: public Poco::Net::HTTPServerRequest
{
public:
ApacheServerRequest(
ApacheRequestRec* pApacheRequest,
const char* serverName,
int serverPort,
const char* clientName,
ApacheRequestRec* pApacheRequest,
const char* serverName,
int serverPort,
const char* clientName,
int clientPort);
/// Creates a new ApacheServerRequest.

Expand Down Expand Up @@ -73,7 +73,7 @@ class ApacheServerRequest: public Poco::Net::HTTPServerRequest
ApacheInputStream* _pStream;
Poco::Net::SocketAddress _serverAddress;
Poco::Net::SocketAddress _clientAddress;

friend class ApacheServerResponse;
};

Expand All @@ -84,7 +84,7 @@ class ApacheServerRequest: public Poco::Net::HTTPServerRequest
inline std::istream& ApacheServerRequest::stream()
{
poco_check_ptr (_pStream);

return *_pStream;
}

Expand Down
20 changes: 10 additions & 10 deletions ApacheConnector/include/ApacheServerResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ApacheServerResponse: public Poco::Net::HTTPServerResponse
void sendContinue();
/// Sends a 100 Continue response to the
/// client.

void sendErrorResponse(int status);
/// Sends an error response with the given
/// status back to the client.
Expand All @@ -55,20 +55,20 @@ class ApacheServerResponse: public Poco::Net::HTTPServerResponse
/// The returned stream is valid until the response
/// object is destroyed.
///
/// Must not be called after sendFile(), sendBuffer()
/// Must not be called after sendFile(), sendBuffer()
/// or redirect() has been called.

void sendFile(const std::string& path, const std::string& mediaType);
/// Sends the response header to the client, followed
/// by the content of the given file.
///
/// Must not be called after send(), sendBuffer()
/// Must not be called after send(), sendBuffer()
/// or redirect() has been called.
///
/// Throws a FileNotFoundException if the file
/// cannot be found, or an OpenFileException if
/// the file cannot be opened.

void sendBuffer(const void* pBuffer, std::size_t length);
/// Sends the response header to the client, followed
/// by the contents of the given buffer.
Expand All @@ -77,12 +77,12 @@ class ApacheServerResponse: public Poco::Net::HTTPServerResponse
/// to length and chunked transfer encoding is disabled.
///
/// If both the HTTP message header and body (from the
/// given buffer) fit into one single network packet, the
/// given buffer) fit into one single network packet, the
/// complete response can be sent in one network packet.
///
/// Must not be called after send(), sendFile()
/// Must not be called after send(), sendFile()
/// or redirect() has been called.

void redirect(const std::string& uri, Poco::Net::HTTPResponse::HTTPStatus status);
/// Sets the status code, which must be one of
/// HTTP_MOVED_PERMANENTLY (301), HTTP_FOUND (302),
Expand All @@ -92,12 +92,12 @@ class ApacheServerResponse: public Poco::Net::HTTPServerResponse
/// the HTTP specification, must be absolute.
///
/// Must not be called after send() has been called.

void requireAuthentication(const std::string& realm);
/// Sets the status code to 401 (Unauthorized)
/// and sets the "WWW-Authenticate" header field
/// according to the given realm.

bool sent() const;
/// Returns true if the response (header) has been sent.

Expand Down
8 changes: 4 additions & 4 deletions ApacheConnector/include/ApacheStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ApacheStreamBuf: public Poco::BufferedStreamBuf
int writeToDevice(const char* buffer, std::streamsize length);

private:
enum
enum
{
STREAM_BUFFER_SIZE = 1024
};
Expand All @@ -53,15 +53,15 @@ class ApacheIOS: public virtual std::ios
public:
ApacheIOS(ApacheRequestRec* pApacheRequest, bool haveData = false);
/// Creates the ApacheIOS with the given socket.

~ApacheIOS();
/// Destroys the ApacheIOS.
///
/// Flushes the buffer, but does not close the socket.

ApacheStreamBuf* rdbuf();
/// Returns a pointer to the internal ApacheStreamBuf.

void close();
/// Flushes the stream.

Expand Down
22 changes: 11 additions & 11 deletions ApacheConnector/samples/FormServer/src/FormServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MyPartHandler: public Poco::Net::PartHandler
_length(0)
{
}

void handlePart(const MessageHeader& header, std::istream& stream)
{
_type = header.get("Content-Type", "(unspecified)");
Expand All @@ -52,18 +52,18 @@ class MyPartHandler: public Poco::Net::PartHandler
_name = params.get("name", "(unnamed)");
_fileName = params.get("filename", "(unnamed)");
}

CountingInputStream istr(stream);
NullOutputStream ostr;
StreamCopier::copyStream(istr, ostr);
_length = istr.chars();
}

int length() const
{
return _length;
}

const std::string& name() const
{
return _name;
Expand All @@ -73,12 +73,12 @@ class MyPartHandler: public Poco::Net::PartHandler
{
return _fileName;
}

const std::string& contentType() const
{
return _type;
}

private:
int _length;
std::string _type;
Expand All @@ -91,10 +91,10 @@ class FormRequestHandler: public HTTPRequestHandler
/// Return a HTML document with the current date and time.
{
public:
FormRequestHandler()
FormRequestHandler()
{
}

void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
{
MyPartHandler partHandler;
Expand All @@ -104,7 +104,7 @@ class FormRequestHandler: public HTTPRequestHandler
response.setContentType("text/html");

std::ostream& ostr = response.send();

ostr <<
"<html>\n"
"<head>\n"
Expand All @@ -127,7 +127,7 @@ class FormRequestHandler: public HTTPRequestHandler
"<input type=\"file\" name=\"file\" size=\"31\"> \n"
"<input type=\"submit\" value=\"Upload\">\n"
"</form>\n";

ostr << "<h2>Request</h2><p>\n";
ostr << "Method: " << request.getMethod() << "<br>\n";
ostr << "URI: " << request.getURI() << "<br>\n";
Expand All @@ -150,7 +150,7 @@ class FormRequestHandler: public HTTPRequestHandler
}
ostr << "</p>";
}

if (!partHandler.name().empty())
{
ostr << "<h2>Upload</h2><p>\n";
Expand Down
4 changes: 2 additions & 2 deletions ApacheConnector/samples/TimeServer/src/TimeServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class TimeRequestHandler: public HTTPRequestHandler
/// Return a HTML document with the current date and time.
{
public:
TimeRequestHandler()
TimeRequestHandler()
{
}

void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
{
Timestamp now;
Expand Down
2 changes: 1 addition & 1 deletion ApacheConnector/src/ApacheApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ApacheApplication::~ApacheApplication()
void ApacheApplication::setup()
{
FastMutex::ScopedLock lock(_mutex);

if (!_ready)
{
std::vector<std::string> cmdLine;
Expand Down
4 changes: 2 additions & 2 deletions ApacheConnector/src/ApacheRequestHandlerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ApacheRequestHandlerFactory::~ApacheRequestHandlerFactory()
Poco::Net::HTTPRequestHandler* ApacheRequestHandlerFactory::createRequestHandler(const Poco::Net::HTTPServerRequest& request)
{
FastMutex::ScopedLock lock(_mutex);

// only if the given uri is found in _uris we are
// handling this request.
RequestHandlerFactories::iterator it = _requestHandlers.begin();
Expand Down Expand Up @@ -75,7 +75,7 @@ void ApacheRequestHandlerFactory::handleURIs(const std::string& uris)


void ApacheRequestHandlerFactory::addRequestHandlerFactory(const std::string& dllPath, const std::string& factoryName, const std::string& uri)
{
{
try
{
_loader.loadLibrary(dllPath);
Expand Down
8 changes: 4 additions & 4 deletions ApacheConnector/src/ApacheServerRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@


ApacheServerRequest::ApacheServerRequest(
ApacheRequestRec* pApacheRequest,
const char* serverName,
int serverPort,
const char* clientName,
ApacheRequestRec* pApacheRequest,
const char* serverName,
int serverPort,
const char* clientName,
int clientPort):
_pApacheRequest(pApacheRequest),
_pResponse(0),
Expand Down
Loading

0 comments on commit e2dc1ca

Please sign in to comment.