Prebuild HTTP headers as much as possible

This avoids some branching when building a HTTP response.
This commit is contained in:
Chocobo1 2020-05-10 02:41:00 +08:00
parent 18b2511238
commit 957d697aee
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 21 additions and 28 deletions

View file

@ -151,12 +151,10 @@ private:
// security related
QStringList m_domainList;
bool m_isClickjackingProtectionEnabled;
bool m_isCSRFProtectionEnabled;
bool m_isSecureCookieEnabled;
bool m_isHostHeaderValidationEnabled;
bool m_isHttpsEnabled;
QString m_contentSecurityPolicy;
// Custom HTTP headers
struct CustomHTTPHeader
@ -164,6 +162,6 @@ private:
QString name;
QString value;
};
bool m_useCustomHTTPHeaders;
QVector<CustomHTTPHeader> m_customHTTPHeaders;
QVector<CustomHTTPHeader> m_prebuiltHeaders;
};