[Box Backup-commit] COMMIT r2423 - in box/trunk: lib/httpserver test/httpserver
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Sat Jan 3 04:21:29 GMT 2009
Author: chris
Date: 2009-01-03 04:21:28 +0000 (Sat, 03 Jan 2009)
New Revision: 2423
Modified:
box/trunk/lib/httpserver/HTTPRequest.cpp
box/trunk/lib/httpserver/HTTPServer.cpp
box/trunk/lib/httpserver/HTTPServer.h
box/trunk/test/httpserver/testhttpserver.cpp
Log:
Compile and config verify fixes for HTTP server code.
Modified: box/trunk/lib/httpserver/HTTPRequest.cpp
===================================================================
--- box/trunk/lib/httpserver/HTTPRequest.cpp 2009-01-03 04:01:29 UTC (rev 2422)
+++ box/trunk/lib/httpserver/HTTPRequest.cpp 2009-01-03 04:21:28 UTC (rev 2423)
@@ -19,6 +19,7 @@
#include "autogen_HTTPException.h"
#include "IOStream.h"
#include "IOStreamGetLine.h"
+#include "Logging.h"
#include "MemLeakFindOn.h"
@@ -219,7 +220,8 @@
}
}
- 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 @@
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 @@
// 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
Modified: box/trunk/lib/httpserver/HTTPServer.cpp
===================================================================
--- box/trunk/lib/httpserver/HTTPServer.cpp 2009-01-03 04:01:29 UTC (rev 2422)
+++ box/trunk/lib/httpserver/HTTPServer.cpp 2009-01-03 04:21:28 UTC (rev 2423)
@@ -73,7 +73,7 @@
{
static ConfigurationVerifyKey verifyserverkeys[] =
{
- HTTPSERVER_VERIFY_SERVER_KEYS(0) // no default addresses
+ HTTPSERVER_VERIFY_SERVER_KEYS(ConfigurationVerifyKey::NoDefaultValue) // no default addresses
};
static ConfigurationVerify verifyserver[] =
Modified: box/trunk/lib/httpserver/HTTPServer.h
===================================================================
--- box/trunk/lib/httpserver/HTTPServer.h 2009-01-03 04:01:29 UTC (rev 2422)
+++ box/trunk/lib/httpserver/HTTPServer.h 2009-01-03 04:21:28 UTC (rev 2423)
@@ -65,7 +65,8 @@
// 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.
Modified: box/trunk/test/httpserver/testhttpserver.cpp
===================================================================
--- box/trunk/test/httpserver/testhttpserver.cpp 2009-01-03 04:01:29 UTC (rev 2422)
+++ box/trunk/test/httpserver/testhttpserver.cpp 2009-01-03 04:21:28 UTC (rev 2423)
@@ -16,6 +16,7 @@
#include "HTTPServer.h"
#include "HTTPRequest.h"
#include "HTTPResponse.h"
+#include "ServerControl.h"
#include "MemLeakFindOn.h"
More information about the Boxbackup-commit
mailing list