If strftime() fails, drop the header without replacement like we already do in case...
authorFabian Keil <fk@fabiankeil.de>
Thu, 18 Jun 2009 17:10:16 +0000 (17:10 +0000)
committerFabian Keil <fk@fabiankeil.de>
Thu, 18 Jun 2009 17:10:16 +0000 (17:10 +0000)
parsers.c

index 643c4f3..2e12501 100644 (file)
--- 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;
             }