From cfe64df399af4baa4f04bd49ef7eb85e6072a6c7 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 7 Sep 2009 18:33:02 +0000 Subject: [PATCH] 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 --- modules/webadmin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index ec9dffc1..3b0a3462 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -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);