mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Added GetPath(), only print headers once, forward declare Cmodule
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1734 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+10
-3
@@ -8,6 +8,7 @@
|
||||
|
||||
#ifdef _MODULES
|
||||
|
||||
#include "Modules.h"
|
||||
#include "HTTPSock.h"
|
||||
#include "znc.h"
|
||||
|
||||
@@ -107,10 +108,12 @@ void CHTTPSock::GetPage() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (PrintHeader(sPage.length())) {
|
||||
Write(sPage);
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
if (!SentHeader()) {
|
||||
PrintHeader(sPage.length());
|
||||
}
|
||||
|
||||
Write(sPage);
|
||||
Close(Csock::CLT_AFTERWRITE);
|
||||
}
|
||||
|
||||
bool CHTTPSock::PrintFile(const CString& sFileName, CString sContentType) {
|
||||
@@ -216,6 +219,10 @@ void CHTTPSock::ParseURI() {
|
||||
m_sURI = m_sURI.Token(0, false, "?");
|
||||
}
|
||||
|
||||
CString CHTTPSock::GetPath() const {
|
||||
return m_sURI.Token(0, false, "?");
|
||||
}
|
||||
|
||||
void CHTTPSock::ParseParams(const CString& sParams) {
|
||||
m_msvsParams.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user