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

Function h2_proxy_util_nghd_make_req

modules/http2/h2_proxy_util.c:428–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428h2_proxy_ngheader *h2_proxy_util_nghd_make_req(apr_pool_t *p,
429 const h2_proxy_request *req)
430{
431
432 h2_proxy_ngheader *ngh;
433 size_t n;
434
435 ap_assert(req);
436 ap_assert(req->scheme);
437 ap_assert(req->authority);
438 ap_assert(req->path);
439 ap_assert(req->method);
440
441 n = 4;
442 apr_table_do(count_header, &n, req->headers, NULL);
443
444 ngh = apr_pcalloc(p, sizeof(h2_proxy_ngheader));
445 ngh->nv = apr_pcalloc(p, n * sizeof(nghttp2_nv));
446 NV_ADD_LIT_CS(ngh, ":scheme", req->scheme);
447 NV_ADD_LIT_CS(ngh, ":authority", req->authority);
448 NV_ADD_LIT_CS(ngh, ":path", req->path);
449 NV_ADD_LIT_CS(ngh, ":method", req->method);
450 apr_table_do(add_table_header, ngh, req->headers, NULL);
451
452 return ngh;
453}
454
455h2_proxy_ngheader *h2_proxy_util_nghd_make(apr_pool_t *p, apr_table_t *headers)
456{

Callers 1

submit_streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected