View | Details | Raw Unified | Return to bug 16521
Collapse All | Expand All

(-)httpd-2.0.46/modules/experimental/mod_cache.c (-3 / +1 lines)
Lines 480-488 Link Here
480
     */
480
     */
481
    exps = apr_table_get(r->headers_out, "Expires");
481
    exps = apr_table_get(r->headers_out, "Expires");
482
    if (exps != NULL) {
482
    if (exps != NULL) {
483
        if (APR_DATE_BAD == (exp = apr_date_parse_http(exps))) {
483
    	exp = apr_date_parse_http(exps);
484
            exps = NULL;
485
        }
486
    }
484
    }
487
    else {
485
    else {
488
        exp = APR_DATE_BAD;
486
        exp = APR_DATE_BAD;
(-)httpd-2.0.46/srclib/apr-util/misc/apr_date.c (-1 / +18 lines)
Lines 189-195 Link Here
189
    apr_time_exp_t ds;
189
    apr_time_exp_t ds;
190
    apr_time_t result;
190
    apr_time_t result;
191
    int mint, mon;
191
    int mint, mon;
192
    const char *monstr, *timstr;
192
    int time_len=12;           /* "HH:MM:SS GMT" */
193
    const char *monstr, *timstr = 0;
193
    static const int months[12] =
194
    static const int months[12] =
194
    {
195
    {
195
    ('J' << 16) | ('a' << 8) | 'n', ('F' << 16) | ('e' << 8) | 'b',
196
    ('J' << 16) | ('a' << 8) | 'n', ('F' << 16) | ('e' << 8) | 'b',
Lines 256-261 Link Here
256
257
257
        monstr = date;
258
        monstr = date;
258
        timstr = date + 7;
259
        timstr = date + 7;
260
	time_len = 13; /* HH:MM:SS YYYY */
259
    }
261
    }
260
    else if (apr_date_checkmask(date, "# @$$ #### ##:##:## *")) {
262
    else if (apr_date_checkmask(date, "# @$$ #### ##:##:## *")) {
261
        /* RFC 1123 format with one day */
263
        /* RFC 1123 format with one day */
Lines 272-277 Link Here
272
    }
274
    }
273
    else
275
    else
274
        return APR_DATE_BAD;
276
        return APR_DATE_BAD;
277
278
    /* Testing if the date has any junk characters at the end  */
279
280
    if(timstr && strlen(timstr) > time_len ) {
281
 
282
       date = timstr + time_len;
283
 
284
       if(date && *date) {
285
           return APR_DATE_BAD;
286
       }
287
    }
288
289
    /* Else If "GMT" is not specified after the time string "HH:MM:SS " 
290
     * Do we have to return APR_BAD_DATE or proceed, as done now? 
291
     */
275
292
276
    if (ds.tm_mday <= 0 || ds.tm_mday > 31)
293
    if (ds.tm_mday <= 0 || ds.tm_mday > 31)
277
        return APR_DATE_BAD;
294
        return APR_DATE_BAD;

Return to bug 16521