summaryrefslogtreecommitdiff
path: root/lib/httpserver
diff options
context:
space:
mode:
Diffstat (limited to 'lib/httpserver')
-rw-r--r--lib/httpserver/HTTPRequest.cpp11
-rw-r--r--lib/httpserver/HTTPServer.cpp2
-rw-r--r--lib/httpserver/HTTPServer.h3
3 files changed, 11 insertions, 5 deletions
diff --git a/lib/httpserver/HTTPRequest.cpp b/lib/httpserver/HTTPRequest.cpp
index 2207e569..4c03e6e8 100644
--- a/lib/httpserver/HTTPRequest.cpp
+++ b/lib/httpserver/HTTPRequest.cpp
@@ -19,6 +19,7 @@
#include "autogen_HTTPException.h"
#include "IOStream.h"
#include "IOStreamGetLine.h"
+#include "Logging.h"
#include "MemLeakFindOn.h"
@@ -219,7 +220,8 @@ bool HTTPRequest::Read(IOStreamGetLine &rGetLine, int Timeout)
}
}
- TRACE3("HTTPRequest: method=%d, uri=%s, version=%d\n", mMethod, mRequestURI.c_str(), mHTTPVersion);
+ BOX_TRACE("HTTPRequest: method=" << mMethod << ", uri=" <<
+ mRequestURI << ", version=" << mHTTPVersion);
// If HTTP 1.1 or greater, assume keep-alive
if(mHTTPVersion >= HTTPVersion_1_1)
@@ -254,7 +256,8 @@ bool HTTPRequest::Read(IOStreamGetLine &rGetLine, int Timeout)
if(fromBuffer > mContentLength) fromBuffer = mContentLength;
if(fromBuffer > 0)
{
- TRACE1("Decoding %d bytes of data from getline buffer\n", fromBuffer);
+ BOX_TRACE("Decoding " << fromBuffer << " bytes of "
+ "data from getline buffer");
decoder.DecodeChunk((const char *)rGetLine.GetBufferedData(), fromBuffer);
// And tell the getline object to ignore the data we just used
rGetLine.IgnoreBufferedData(fromBuffer);
@@ -368,7 +371,9 @@ void HTTPRequest::ParseHeaders(IOStreamGetLine &rGetLine, int Timeout)
// Truncate the string to just the hostname
mHostName = mHostName.substr(0, colon);
- TRACE2("Host: header, hostname = '%s', host port = %d\n", mHostName.c_str(), mHostPort);
+ BOX_TRACE("Host: header, hostname = " <<
+ "'" << mHostName << "', host "
+ "port = " << mHostPort);
}
}
else if(p == sizeof("Cookie")-1
diff --git a/lib/httpserver/HTTPServer.cpp b/lib/httpserver/HTTPServer.cpp
index 2db78b23..742b392f 100644
--- a/lib/httpserver/HTTPServer.cpp
+++ b/lib/httpserver/HTTPServer.cpp
@@ -73,7 +73,7 @@ const ConfigurationVerify *HTTPServer::GetConfigVerify() const
{
static ConfigurationVerifyKey verifyserverkeys[] =
{
- HTTPSERVER_VERIFY_SERVER_KEYS(0) // no default addresses
+ HTTPSERVER_VERIFY_SERVER_KEYS(ConfigurationVerifyKey::NoDefaultValue) // no default addresses
};
static ConfigurationVerify verifyserver[] =
diff --git a/lib/httpserver/HTTPServer.h b/lib/httpserver/HTTPServer.h
index 88da7abf..9a86b04f 100644
--- a/lib/httpserver/HTTPServer.h
+++ b/lib/httpserver/HTTPServer.h
@@ -65,7 +65,8 @@ private:
// Root level
#define HTTPSERVER_VERIFY_ROOT_KEYS \
- {"AddressPrefix", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0}
+ ConfigurationVerifyKey("AddressPrefix", \
+ ConfigTest_Exists | ConfigTest_LastEntry)
// AddressPrefix is, for example, http://localhost:1080 -- ie the beginning of the URI
// This is used for handling redirections.