mirror of
https://github.com/znc/znc.git
synced 2026-07-04 00:41:38 +02:00
Take advantage of Csocket changes for graceful Close()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@496 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+5
-5
@@ -39,7 +39,7 @@ void CHTTPSock::CheckPost() {
|
||||
GetPage();
|
||||
m_sPostData.clear();
|
||||
m_bDone = true;
|
||||
Close();
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void CHTTPSock::GetPage() {
|
||||
|
||||
if (PrintHeader(sPage.length())) {
|
||||
Write(sPage);
|
||||
Close();
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ bool CHTTPSock::ForceLogin() {
|
||||
AddHeader("WWW-Authenticate", "Basic realm=\"" + CZNC::GetTag() + "\"");
|
||||
PrintHeader(sPage.length(), "text/html", 401, "Unauthorized");
|
||||
Write(sPage);
|
||||
Close();
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ bool CHTTPSock::PrintNotFound() {
|
||||
CString sPage = GetErrorPage(404, "Not Found", "The requested URL was not found on this server.");
|
||||
PrintHeader(sPage.length(), "text/html", 404, "Not Found");
|
||||
Write(sPage);
|
||||
Close();
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ bool CHTTPSock::Redirect(const CString& sURL) {
|
||||
AddHeader("Location", sURL);
|
||||
PrintHeader(sPage.length(), "text/html", 302, "Found");
|
||||
Write(sPage);
|
||||
Close();
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user