+/*********************************************************************
+ *
+ * Function : parse_time_header
+ *
+ * Description : Parses the time in an HTTP time header to get
+ * the numerical respresentation.
+ *
+ * Parameters :
+ * 1 : header = HTTP header with a time value
+ * 2 : result = storage for header_time in seconds
+ *
+ * Returns : JB_ERR_OK if the time format was recognized, or
+ * JB_ERR_PARSE otherwise.
+ *
+ *********************************************************************/
+static jb_err parse_time_header(const char *header, time_t *result)
+{
+ const char *header_time;
+
+ header_time = strchr(header, ':');
+
+ /*
+ * Currently this can't happen as all callers are called
+ * through sed() which requires a header name followed by
+ * a colon.
+ */
+ assert(header_time != NULL);
+
+ header_time++;
+ if (*header_time == ' ')
+ {
+ header_time++;
+ }
+
+ return parse_header_time(header_time, result);
+
+}
+