Finish support for RPC user/pass auth.

This commit is contained in:
JoelKatz
2013-01-18 05:35:10 -08:00
parent fd76033e55
commit ae51e9d203
5 changed files with 23 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ SETUP_LOG();
void HTTPRequest::reset()
{
vHeaders.clear();
mHeaders.clear();
sRequestBody.clear();
sAuthorization.clear();
iDataSize = 0;
@@ -67,8 +67,6 @@ HTTPRequestAction HTTPRequest::consume(boost::asio::streambuf& buf)
eState = getting_body;
return haREAD_RAW;
}
vHeaders.push_back(line);
size_t colon = line.find(':');
if (colon != std::string::npos)
{
@@ -79,6 +77,8 @@ HTTPRequestAction HTTPRequest::consume(boost::asio::streambuf& buf)
std::string headerValue = line.substr(colon+1);
boost::trim(headerValue);
mHeaders[headerName] += headerValue;
if (headerName == "connection")
{
boost::to_lower(headerValue);