Browse Source

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

personal/stbuehler/wip
Thomas Porzelt 13 years ago
parent
commit
98276a9b6f
  1. 4
      src/modules/mod_expire.c

4
src/modules/mod_expire.c

@ -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)

Loading…
Cancel
Save