| 618 | } |
| 619 | |
| 620 | apr_status_t h2_proxy_req_make(h2_proxy_request *req, apr_pool_t *pool, |
| 621 | const char *method, const char *scheme, |
| 622 | const char *authority, const char *path, |
| 623 | apr_table_t *headers) |
| 624 | { |
| 625 | h1_ctx x; |
| 626 | const char *val; |
| 627 | |
| 628 | req->method = method; |
| 629 | req->scheme = scheme; |
| 630 | req->authority = authority; |
| 631 | req->path = path; |
| 632 | |
| 633 | ap_assert(req->scheme); |
| 634 | ap_assert(req->authority); |
| 635 | ap_assert(req->path); |
| 636 | ap_assert(req->method); |
| 637 | |
| 638 | x.pool = pool; |
| 639 | x.headers = req->headers; |
| 640 | apr_table_do(set_h1_header, &x, headers, NULL); |
| 641 | if ((val = apr_table_get(headers, "TE")) && ap_find_token(pool, val, "trailers")) { |
| 642 | /* client accepts trailers, forward this information */ |
| 643 | apr_table_addn(req->headers, "TE", "trailers"); |
| 644 | } |
| 645 | apr_table_setn(req->headers, "te", "trailers"); |
| 646 | return APR_SUCCESS; |
| 647 | } |
| 648 | |
| 649 | /******************************************************************************* |
| 650 | * frame logging |
no test coverage detected