Content-Type for POST

This commit is contained in:
orignal 2014-09-12 18:36:56 -04:00
parent d7637bc0cd
commit 124007dc31
2 changed files with 15 additions and 12 deletions

View file

@ -63,9 +63,12 @@ namespace proxy
request r;
ExtractRequest(r);
parseHeaders(m_Buffer, r.headers);
const char * data = strstr (m_Buffer, "\r\n\r\n");
if (data) data += 4;
const char * data = nullptr;
if (r.method == "POST")
{
data = strstr (m_Buffer, "\r\n\r\n");
if (data) data += 4;
}
LogPrint("Requesting ", r.host, " with path ", r.uri, " and method ", r.method);
HandleDestinationRequest(r.host, r.method, data ? std::string (data) : "" , r.uri);
}