From 025e7ee835b26cd3f7b6bc1df51a7e94eff4401d Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 18 Oct 2011 14:22:49 -0400 Subject: [PATCH] std.datetime --- cgi.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cgi.d b/cgi.d index 9313211..3696902 100644 --- a/cgi.d +++ b/cgi.d @@ -690,7 +690,7 @@ class Cgi { hd ~= "Location: " ~ responseLocation; } if(!noCache && responseExpires != long.min) { // an explicit expiration date is set - auto expires = SysTime(unixTimeToStdTime(cast(int)(responseExpires / 1000))); + auto expires = SysTime(unixTimeToStdTime(cast(int)(responseExpires / 1000)), UTC()); hd ~= "Expires: " ~ printDate( cast(DateTime) expires); // FIXME: assuming everything is private unless you use nocache - generally right for dynamic pages, but not necessarily @@ -1014,7 +1014,6 @@ version(embedded_httpd) void writeFcgi(const(ubyte)[] data) { FCGX_PutStr(data.ptr, data.length, output); } - while(FCGX_Accept(&input, &output, &error, &env) >= 0) { string[string] fcgienv; @@ -1043,7 +1042,7 @@ version(embedded_httpd) fun(cgi); cgi.close(); } catch(Throwable t) { - if(1) { // !cgi.isClosed) { + if(1) { // !cgi.isClosed) auto msg = t.toString; FCGX_PutStr(cast(ubyte*) msg.ptr, msg.length, error); msg = "Status: 500 Internal Server Error\n";