mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Removes charset=UTF-8 from content-type variable
This commit is contained in:
parent
8f16650595
commit
31d5d79089
@ -962,7 +962,12 @@ int Transaction::addResponseHeader(const std::string& key,
|
||||
this->m_collections.store("RESPONSE_HEADERS:" + key, value);
|
||||
|
||||
if (utils::string::tolower(key) == "content-type") {
|
||||
this->m_responseContentType->assign(value);
|
||||
// Removes the charset=...
|
||||
// Content-Type: text/html; charset=UTF-8
|
||||
std::vector<std::string> val = utils::string::split(value, ';');
|
||||
if (val.size() > 0) {
|
||||
this->m_responseContentType->assign(val[0]);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user