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

(-)httpd-2.0.50/modules/experimental/mod_disk_cache.c.orig (-6 / +6 lines)
Lines 560-565 Link Here
560
560
561
        if (r->headers_out) {
561
        if (r->headers_out) {
562
            int i;
562
            int i;
563
            
564
            /* This case only occurs when the content is generated locally */
565
            if (!apr_table_get(r->headers_out, "Content-Type") && r->content_type) {
566
                apr_table_setn(r->headers_out, "Content-Type", 
567
                               ap_make_content_type(r, r->content_type));
568
            }
563
            apr_table_t* headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out);
569
            apr_table_t* headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out);
564
            apr_table_entry_t *elts = (apr_table_entry_t *) apr_table_elts(headers_out)->elts;
570
            apr_table_entry_t *elts = (apr_table_entry_t *) apr_table_elts(headers_out)->elts;
565
            for (i = 0; i < apr_table_elts(headers_out)->nelts; ++i) {
571
            for (i = 0; i < apr_table_elts(headers_out)->nelts; ++i) {
Lines 572-583 Link Here
572
            buf = apr_pstrcat(r->pool, CRLF, NULL);
578
            buf = apr_pstrcat(r->pool, CRLF, NULL);
573
            amt = strlen(buf);
579
            amt = strlen(buf);
574
            apr_file_write(hfd, buf, &amt);
580
            apr_file_write(hfd, buf, &amt);
575
            
576
            /* This case only occurs when the content is generated locally */
577
            if (!apr_table_get(r->headers_out, "Content-Type") && r->content_type) {
578
                apr_table_setn(r->headers_out, "Content-Type", 
579
                               ap_make_content_type(r, r->content_type));
580
            }
581
        }
581
        }
582
        sprintf(statusbuf,"%d", r->status);
582
        sprintf(statusbuf,"%d", r->status);
583
        buf = apr_pstrcat(r->pool, statusbuf, CRLF, NULL);
583
        buf = apr_pstrcat(r->pool, statusbuf, CRLF, NULL);

Return to bug 30278