Rename MAX_SIZE and move it to rpc.cpp

This commit is contained in:
Vinnie Falco
2013-05-28 16:14:30 -07:00
parent 045a5f0af1
commit 224456c59e
2 changed files with 3 additions and 3 deletions

View File

@@ -11,8 +11,6 @@ std::string strprintf(const char* format, ...);
std::string FormatFullVersion();
void RandAddSeedPerfmon();
static const unsigned int MAX_SIZE = 0x02000000;
#define loop for (;;)
#define PAIR(t1, t2) pair<t1, t2>

View File

@@ -23,6 +23,8 @@ SETUP_LOG (RPC)
using namespace boost;
using namespace boost::asio;
unsigned int const gMaxHTTPHeaderSize = 0x02000000;
Json::Value JSONRPCError(int code, const std::string& message)
{
Json::Value error(Json::objectValue);
@@ -173,7 +175,7 @@ int ReadHTTP(std::basic_istream<char>& stream, std::map<std::string, std::string
// Read header
int nLen = ReadHTTPHeader(stream, mapHeadersRet);
if (nLen < 0 || nLen > MAX_SIZE)
if (nLen < 0 || nLen > gMaxHTTPHeaderSize)
return 500;
// Read message