mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Make it possible to process HTTP requests async
This changes CHTTPSock so that one can handle HTTP requests asynchronously. This is done by not forcing a page to be sent out in the caller of OnPageRequest() but instead requiring a call to the new function CHTTPSock::PrintPage(). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1830 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+3
-6
@@ -125,15 +125,12 @@ void CHTTPSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
void CHTTPSock::GetPage() {
|
||||
CString sPage;
|
||||
|
||||
DEBUG("Page Request [" << m_sURI << "] ");
|
||||
|
||||
if (!OnPageRequest(m_sURI, sPage)) {
|
||||
PrintNotFound();
|
||||
return;
|
||||
}
|
||||
OnPageRequest(m_sURI);
|
||||
}
|
||||
|
||||
void CHTTPSock::PrintPage(const CString& sPage) {
|
||||
if (!SentHeader()) {
|
||||
PrintHeader(sPage.length());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user