| 770 | } |
| 771 | |
| 772 | static void process_proxy_header(request_rec *r, proxy_dir_conf *c, |
| 773 | const char *key, const char *value) |
| 774 | { |
| 775 | static const char *date_hdrs[] |
| 776 | = { "Date", "Expires", "Last-Modified", NULL }; |
| 777 | static const struct { |
| 778 | const char *name; |
| 779 | ap_proxy_header_reverse_map_fn func; |
| 780 | } transform_hdrs[] = { |
| 781 | { "Location", ap_proxy_location_reverse_map }, |
| 782 | { "Content-Location", ap_proxy_location_reverse_map }, |
| 783 | { "URI", ap_proxy_location_reverse_map }, |
| 784 | { "Destination", ap_proxy_location_reverse_map }, |
| 785 | { "Set-Cookie", ap_proxy_cookie_reverse_map }, |
| 786 | { NULL, NULL } |
| 787 | }; |
| 788 | int i; |
| 789 | for (i = 0; date_hdrs[i]; ++i) { |
| 790 | if (!ap_cstr_casecmp(date_hdrs[i], key)) { |
| 791 | apr_table_add(r->headers_out, key, |
| 792 | date_canon(r->pool, value)); |
| 793 | return; |
| 794 | } |
| 795 | } |
| 796 | for (i = 0; transform_hdrs[i].name; ++i) { |
| 797 | if (!ap_cstr_casecmp(transform_hdrs[i].name, key)) { |
| 798 | apr_table_add(r->headers_out, key, |
| 799 | (*transform_hdrs[i].func)(r, c, value)); |
| 800 | return; |
| 801 | } |
| 802 | } |
| 803 | apr_table_add(r->headers_out, key, value); |
| 804 | } |
| 805 | |
| 806 | /* |
| 807 | * Note: pread_len is the length of the response that we've mistakenly |
no test coverage detected