mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Prefer StartsWith(s) over Left(n) == s
This commit is contained in:
+1
-1
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user