From a922e944e81f03664de455b391777c9f59a74215 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 11 Jul 2006 14:43:03 +0000 Subject: Make it not b0rk on empty headers git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4336 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_httpd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index e0a3e9d5c..73683640e 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -169,7 +169,8 @@ class HttpSocket : public InspSocket struct tm *timeinfo = localtime(&TIME); this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: "); this->Write(asctime(timeinfo)); - this->Write(extraheaders); + if (!extraheaders.empty()) + this->Write(extraheaders); this->Write("Server: InspIRCd/m_httpd.so/1.1\r\nContent-Length: "+ConvToStr(size)+ "\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n"); } -- cgit v1.2.3