diff options
author | Christian Hesse <mail@eworm.de> | 2014-06-16 12:24:50 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-06-16 12:24:50 +0200 |
commit | 39f4363447961e50cec3eb6baa6df8bb80371860 (patch) | |
tree | 58149068de9b411751bd3b392607b3e2cb7a3499 | |
parent | 1b8d77c7217bd5244c8272df43ffa71d915c74ae (diff) | |
download | pacredir-39f4363447961e50cec3eb6baa6df8bb80371860.tar.gz pacredir-39f4363447961e50cec3eb6baa6df8bb80371860.tar.zst |
print modification datprint modification date
-rw-r--r-- | pacredir.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -309,6 +309,7 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * struct request * request = NULL; long http_code = 0, last_modified = 0; double time_total = INFINITY; + char ctime[26]; /* we want the filename, not the path */ basename = uri; @@ -406,8 +407,11 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * request = requests[i]; + ctime_r(&request->last_modified, ctime); + ctime[strlen(ctime) - 1] = 0; + if (request->http_code == MHD_HTTP_OK) - write_log(stdout, "Found: %s (%f sec)\n", request->url, request->time_total); + write_log(stdout, "Found: %s (%f sec, modified: %s)\n", request->url, request->time_total, ctime); if (request->http_code == MHD_HTTP_OK && /* for db files choose the most recent server */ |