From 3b71f4f36c7144acd4e701151f0687ceb2b540b3 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 18 Jun 2009 17:10:16 +0000 Subject: [PATCH] If strftime() fails, drop the header without replacement like we already do in case of other problems. --- parsers.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/parsers.c b/parsers.c index 643c4f3a..2e12501f 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.182 2009/06/17 14:51:51 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.183 2009/06/17 18:23:06 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -2338,8 +2338,9 @@ static jb_err server_last_modified(struct client_state *csp, char **header) sizeof(newheader), "%a, %d %b %Y %H:%M:%S GMT", timeptr)) { log_error(LOG_LEVEL_ERROR, - "Randomizing '%s' failed. Keeping the header unmodified.", + "Randomizing '%s' failed. Crunching the header without replacement.", *header); + freez(*header); return JB_ERR_OK; } @@ -3065,8 +3066,9 @@ static jb_err client_if_modified_since(struct client_state *csp, char **header) sizeof(newheader), "%a, %d %b %Y %H:%M:%S GMT", timeptr)) { log_error(LOG_LEVEL_ERROR, - "Randomizing '%s' failed. Keeping the header unmodified.", + "Randomizing '%s' failed. Crunching the header without replacement.", *header); + freez(*header); return JB_ERR_OK; } -- 2.39.2