Prefer StartsWith(s) over Left(n) == s

This commit is contained in:
J-P Nurmi
2015-08-14 12:34:27 +02:00
parent 52395fad5e
commit 4995e7517e
10 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -385,7 +385,7 @@ bool CHTTPSock::PrintFile(const CString& sFileName, CString sContentType) {
}
#ifdef HAVE_ZLIB
bool bGzip = m_bAcceptGzip && (sContentType.Left(5).Equals("text/") || sFileName.Right(3).Equals(".js"));
bool bGzip = m_bAcceptGzip && (sContentType.StartsWith("text/") || sFileName.Right(3).Equals(".js"));
if (bGzip) {
DEBUG("- Sending gzip-compressed.");