summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-11 14:43:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-11 14:43:03 +0000
commita922e944e81f03664de455b391777c9f59a74215 (patch)
treed83b3d6287e1b41e687de9cbab75ad90cb40a684 /src/modules/m_httpd.cpp
parent74ba5a43d6fb5ab013f3485dea592c1e0b408a51 (diff)
Make it not b0rk on empty headers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4336 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp3
1 files changed, 2 insertions, 1 deletions
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");
}