Discards the `charset' from the C-T while checking for body processors

Issue #1330
This commit is contained in:
Felipe Zimmerle 2017-02-23 23:00:01 -03:00 committed by Felipe Zimmerle
parent 7ab192e90f
commit 39761ce7b8
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -541,13 +541,14 @@ int Transaction::addRequestHeader(const std::string& key,
if (keyl == "content-type") {
std::string multipart("multipart/form-data");
std::string urlencoded("application/x-www-form-urlencoded;");
std::string l = utils::string::tolower(value);
if (l.compare(0, multipart.length(), multipart) == 0) {
this->m_requestBodyType = MultiPartRequestBody;
m_variableReqbodyProcessor.set("MULTIPART", m_variableOffset);
}
if (l == "application/x-www-form-urlencoded") {
if (l.compare(0, urlencoded.length(), urlencoded) == 0) {
this->m_requestBodyType = WWWFormUrlEncoded;
m_variableReqbodyProcessor.set("URLENCODED", m_variableOffset);
}