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

Function find_conn_headers

modules/proxy/proxy_util.c:4492–4519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4490} header_connection;
4491
4492static int find_conn_headers(void *data, const char *key, const char *val)
4493{
4494 header_connection *x = data;
4495 const char *name;
4496
4497 do {
4498 while (*val == ',' || *val == ';') {
4499 val++;
4500 }
4501 name = ap_get_token(x->pool, &val, 0);
4502 if (!strcasecmp(name, "close")) {
4503 x->closed = 1;
4504 }
4505 if (!x->first) {
4506 x->first = name;
4507 }
4508 else {
4509 const char **elt;
4510 if (!x->array) {
4511 x->array = apr_array_make(x->pool, 4, sizeof(char *));
4512 }
4513 elt = apr_array_push(x->array);
4514 *elt = name;
4515 }
4516 } while (*val);
4517
4518 return 1;
4519}
4520
4521/**
4522 * Remove all headers referred to by the Connection header.

Callers

nothing calls this directly

Calls 1

ap_get_tokenFunction · 0.85

Tested by

no test coverage detected