diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-30 18:30:02 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-30 18:30:02 +0000 |
commit | f37484b45415d5bfd6aed51088d6af318dd6a665 (patch) | |
tree | 966e0f1eaa7e4c9ae8b5a1690beb199b19082afe | |
parent | 4695b631fbf84d23a8543f21f90d195b243e1276 (diff) |
Replace blank error pages with an error page
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7621 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_httpd.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 631f89176..af8eac920 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -211,15 +211,14 @@ class HttpServerSocket : public InspSocket this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: "); this->Write(asctime(timeinfo)); if (extraheaders.empty()) - { this->Write("Content-Type: text/html\r\n"); - } else - { this->Write(extraheaders); - } this->Write("Server: InspIRCd/m_httpd.so/1.1\r\nContent-Length: "+ConvToStr(size)+ "\r\nConnection: close\r\n\r\n"); + if (response != 200) + this->Write("<html><head></head><body>Server error "+ConvToStr(response)+": "+Response(response)+"<br>"+ + "<small>Powered by <a href='http://www.inspircd.org'>InspIRCd</a></small></body></html>\r\n"); } virtual bool OnDataReady() |