mirror of
https://github.com/inspircd/inspircd.git
synced 2025-04-22 16:01:29 -04:00
Use gmtime() not localtime() as RFC2616 says dates sent by a http server must be GMT/UTC
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5248 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
1d6fcf371c
commit
08b7e8e60e
@ -172,7 +172,7 @@ class HttpSocket : public InspSocket
|
||||
void SendHeaders(unsigned long size, int response, const std::string &extraheaders)
|
||||
{
|
||||
time_t local = this->Instance->Time();
|
||||
struct tm *timeinfo = localtime(&local);
|
||||
struct tm *timeinfo = gmtime(&local);
|
||||
this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: ");
|
||||
this->Write(asctime(timeinfo));
|
||||
if (extraheaders.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user