webadmin: Increase buffer on HTTP sockets on the irc port

When webadmin "grabs" HTTP connections from the IRC port, it moves the
underlying connection to its own socket class and copies all of the settings
from the old socket to this new one.

One of the properties that is copied is the MaxBufferThreshold which is 1024 for
IRC sockets, but which should be 10240 webadmin sockets (CSocket::CSocket()).
This could theoretically cause bugs like the "blank page in firefox" reported by
kaiz0ku.

Anyway, this is hopefully fixed by setting the 10k MaxBufferThreshold again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1617 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-09-07 18:33:02 +00:00
parent ecc5973aed
commit cfe64df399

View File

@@ -228,9 +228,11 @@ public:
|| sLine.WildCmp("POST * HTTP/1.?")) {
CWebAdminSock* pSock = new CWebAdminSock(this);
CZNC::Get().GetManager().SwapSockByAddr(pSock, pClient);
// And don't forget to give it some sane name / timeout
// And don't forget to give it some sane settings again
pSock->SetSockName("WebAdmin::Client");
pSock->SetTimeout(120);
pSock->SetMaxBufferThreshold(10240);
// TODO can we somehow get rid of this?
pSock->ReadLine(sLine);