From 44ec0f3a83afcbd9f17bdef139725b18cf0607f3 Mon Sep 17 00:00:00 2001 From: Dave Wetzel Date: Wed, 12 Jun 2013 02:07:41 +0000 Subject: [PATCH] print 'never' and not the epoch time if there was never a response git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@36724 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ GSWAdaptors/Apache2/mod_gsw.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8de4da0..3d96afb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-06-11: David Wetzel + * GSWAdaptors/Apache2/mod_gsw.c + print 'never' and not the epoch time if there was never a response + 2013-06-09: Sebastian Reitenbach * GSWAdaptors/Apache/mod_gsweb.c * GSWAdaptors/common/GNUmakefile diff --git a/GSWAdaptors/Apache2/mod_gsw.c b/GSWAdaptors/Apache2/mod_gsw.c index b8788ff..303ed8f 100644 --- a/GSWAdaptors/Apache2/mod_gsw.c +++ b/GSWAdaptors/Apache2/mod_gsw.c @@ -1364,8 +1364,12 @@ static int gsw_handler(request_rec *r) ap_rprintf(r, "%s", (mem[i].refusing == 1) ? "YES": "NO"); apr_ctime(timestr, mem[i].last_request_time); ap_rprintf(r, "%s", timestr); - apr_ctime(timestr, mem[i].last_response_time); - ap_rprintf(r, "%s\n", timestr); + if (mem[i].last_response_time > 0) { + apr_ctime(timestr, mem[i].last_response_time); + ap_rprintf(r, "%s\n", timestr); + } else { + ap_rprintf(r, "never\n"); + } } ap_rputs("
\n",r);