2
0
Fork 0

[mod_expire] Log errno in case gmtime_r() should fail

This commit is contained in:
Thomas Porzelt 2009-07-04 22:06:48 +02:00
parent c49219699e
commit 98276a9b6f
1 changed files with 3 additions and 1 deletions

View File

@ -124,8 +124,10 @@ static handler_t expire(vrequest *vr, gpointer param, gpointer *context) {
/* format date */
g_string_set_size(date_str, 255);
if (!gmtime_r(&expire_date, &tm))
if (!gmtime_r(&expire_date, &tm)) {
VR_ERROR(vr, "gmtime_r(%"G_GUINT64_FORMAT") failed: %s", (guint64)expire_date, g_strerror(errno));
return HANDLER_GO_ON;
}
len = strftime(date_str->str, date_str->allocated_len, "%a, %d %b %Y %H:%M:%S GMT", &tm);
if (len == 0)