diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_httpd.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 73683640e..58dece323 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -169,10 +169,16 @@ class HttpSocket : public InspSocket struct tm *timeinfo = localtime(&TIME); this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: "); this->Write(asctime(timeinfo)); - if (!extraheaders.empty()) + 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\nContent-Type: text/html\r\n\r\n"); + "\r\nConnection: close\r\n\r\n"); } virtual bool OnDataReady() |