fielding 97/04/07 03:19:32
Modified: src CHANGES mod_negotiation.c Log: Use err_headers_out for Vary and Alternates, since the new send_http_header() now sends them for all responses. Submitted by: Petr Lampa Reviewed by: Roy Fielding, Dean Gaudet Revision Changes Path 1.224 +3 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.223 retrieving revision 1.224 diff -C3 -r1.223 -r1.224 *** CHANGES 1997/04/07 09:59:49 1.223 --- CHANGES 1997/04/07 10:19:30 1.224 *************** *** 48,53 **** --- 48,56 ---- ensure that the server-reserved fields are not being overridden, while not overriding those that are not reserved. [Roy Fielding] + *) Moved transparent content negotiation fields to err_headers_out + to reflect above changes. [Petr Lampa] + *) Fixed the determination of whether or not we should make the connection persistent for all of the cases where some other part of the server has already indicated that we should not. Also 1.39 +8 -17 apache/src/mod_negotiation.c Index: mod_negotiation.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C3 -r1.38 -r1.39 *** mod_negotiation.c 1997/04/01 05:41:44 1.38 --- mod_negotiation.c 1997/04/07 10:19:31 1.39 *************** *** 1663,1680 **** int vary_by_encoding = 0; array_header *hdrs; ! /* This is a bit of a hack: the apache status handling code regards ! * any status other than 200 as an error, and only outputs ! * headers marked as safe for output with errors. This ! * are the header stored in err_headers_out. If we know ! * we are going to generate a 300 status (because we got ! * a network-algorithm result of na_list), we put these ! * headers into err_headers_out to get them output with the ! * list response. The core code which handles error responses ! * should really be updated, since these headers should probably ! * be output for other 2xx and 3xx statuses as well. ! */ ! hdrs = (na_result == na_list) ? r->err_headers_out : r->headers_out; for (j = 0; j < neg->avail_vars->nelts; ++j) { --- 1663,1671 ---- int vary_by_encoding = 0; array_header *hdrs; ! /* Put headers into err_headers_out, new send_http_header() ! * outputs both headers_out and err_headers_out */ ! hdrs = r->err_headers_out; for (j = 0; j < neg->avail_vars->nelts; ++j) { *************** *** 1832,1844 **** */ if ((sub_req->status == HTTP_MULTIPLE_CHOICES) || ! (table_get(sub_req->headers_out, "Alternates")) || ! (table_get(sub_req->headers_out, "Content-Location"))) return VARIANT_ALSO_VARIES; ! if ((sub_vary = table_get(sub_req->headers_out, "Vary")) != NULL) ! table_set(r->headers_out, "Variant-Vary", sub_vary); ! table_set(r->headers_out, "Content-Location", variant->file_name); set_neg_headers(r, neg, na_choice); /* add Alternates and Vary */ /* to do: add Expires */ --- 1823,1835 ---- */ if ((sub_req->status == HTTP_MULTIPLE_CHOICES) || ! (table_get(sub_req->err_headers_out, "Alternates")) || ! (table_get(sub_req->err_headers_out, "Content-Location"))) return VARIANT_ALSO_VARIES; ! if ((sub_vary = table_get(sub_req->err_headers_out, "Vary")) != NULL) ! table_set(r->err_headers_out, "Variant-Vary", sub_vary); ! table_set(r->err_headers_out, "Content-Location", variant->file_name); set_neg_headers(r, neg, na_choice); /* add Alternates and Vary */ /* to do: add Expires */