Make some functions in CHTTPSock pure virtual where it makes sense

Or do you seriously expect anyone to set up a http which always replies
with 404 File not found errors?


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1372 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-02-04 16:29:06 +00:00
parent 0ac3466f75
commit 35458af905
2 changed files with 2 additions and 14 deletions

View File

@@ -283,10 +283,6 @@ const map<CString, VCString>& CHTTPSock::GetParams() const {
return m_msvsParams;
}
bool CHTTPSock::OnPageRequest(const CString& sURI, CString& sPageRet) {
return false;
}
bool CHTTPSock::PrintNotFound() {
return PrintErrorPage(404, "Not Found", "The requested URL was not found on this server.");
}
@@ -416,12 +412,4 @@ void CHTTPSock::ReachedMaxBuffer() {
Close();
}
Csock* CHTTPSock::GetSockObj(const CString& sHost, unsigned short uPort) {
CHTTPSock* pSock = new CHTTPSock(m_pModule);
pSock->SetSockName("HTTP::CLIENT");
pSock->SetTimeout(120);
return pSock;
}
#endif // _MODULES

View File

@@ -27,11 +27,11 @@ public:
virtual void Timeout();
virtual void Connected();
virtual void Disconnected();
virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort);
virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort) = 0;
// !Csocket derived members
// Hooks
virtual bool OnPageRequest(const CString& sURI, CString& sPageRet);
virtual bool OnPageRequest(const CString& sURI, CString& sPageRet) = 0;
virtual bool OnLogin(const CString& sUser, const CString& sPass);
// !Hooks