Allows REQUEST_HEADERS:Content-Type to be null

If REQUEST_HEADERS:Content-Type is null, REQBODY_ERROR will be marked as "0"
This commit is contained in:
Felipe Zimmerle 2016-07-18 21:31:26 -03:00
parent c961373fc1
commit 52808b6cf0
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -700,7 +700,8 @@ int Transaction::processRequestBody() {
}
} else if (m_requestBodyType == WWWFormUrlEncoded) {
extractArguments("POST", m_requestBody.str());
} else {
} else if (m_collections.resolveFirst(
"REQUEST_HEADERS:Content-Type") != NULL) {
std::string *a = m_collections.resolveFirst(
"REQUEST_HEADERS:Content-Type");
std::string error;
@ -713,6 +714,9 @@ int Transaction::processRequestBody() {
"Unknown request body processor: " + error);
m_collections.storeOrUpdateFirst("REQBODY_PROCESSOR_ERROR_MSG",
"Unknown request body processor: " + error);
} else {
m_collections.storeOrUpdateFirst("REQBODY_ERROR", "0");
m_collections.storeOrUpdateFirst("REQBODY_PROCESSOR_ERROR", "0");
}
/**