MCPcopy Create free account
hub / github.com/apache/httpd / ap_proxy_clear_connection

Function ap_proxy_clear_connection

modules/proxy/proxy_util.c:4524–4550  ·  view source on GitHub ↗

* Remove all headers referred to by the Connection header. */

Source from the content-addressed store, hash-verified

4522 * Remove all headers referred to by the Connection header.
4523 */
4524static int ap_proxy_clear_connection(request_rec *r, apr_table_t *headers)
4525{
4526 const char **name;
4527 header_connection x;
4528
4529 x.pool = r->pool;
4530 x.array = NULL;
4531 x.first = NULL;
4532 x.closed = 0;
4533
4534 apr_table_unset(headers, "Proxy-Connection");
4535
4536 apr_table_do(find_conn_headers, &x, headers, "Connection", NULL);
4537 if (x.first) {
4538 /* fast path - no memory allocated for one header */
4539 apr_table_unset(headers, "Connection");
4540 apr_table_unset(headers, x.first);
4541 }
4542 if (x.array) {
4543 /* two or more headers */
4544 while ((name = apr_array_pop(x.array))) {
4545 apr_table_unset(headers, *name);
4546 }
4547 }
4548
4549 return x.closed;
4550}
4551
4552PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
4553 apr_bucket_brigade *header_brigade,

Callers 1

ap_proxy_create_hdrbrgdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected