From 26396b1b06cab3242059d339aca84d3c0a3c56d1 Mon Sep 17 00:00:00 2001 From: cflakes Date: Mon, 21 Jun 2010 12:51:37 +0000 Subject: [PATCH] Revert unintended change from revision 2029 and added a comment so it won't happen again. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2036 726aef4b-f618-498e-8847-2d620e286838 --- HTTPSock.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/HTTPSock.cpp b/HTTPSock.cpp index 8e45389d..6f164339 100644 --- a/HTTPSock.cpp +++ b/HTTPSock.cpp @@ -43,7 +43,12 @@ void CHTTPSock::ReadData(const char* data, size_t len) { bool CHTTPSock::SendCookie(const CString& sKey, const CString& sValue) { if (!sKey.empty() && !sValue.empty()) { - m_msResponseCookies[sKey] = sValue; + if (m_msRequestCookies.find(sKey) == m_msRequestCookies.end() || + m_msRequestCookies[sKey].StrCmp(sValue) != 0) + { + // only queue a Set-Cookie to be sent if the client didn't send a Cookie header of the same name+value. + m_msResponseCookies[sKey] = sValue; + } return true; }