| 453 | } |
| 454 | |
| 455 | h2_proxy_ngheader *h2_proxy_util_nghd_make(apr_pool_t *p, apr_table_t *headers) |
| 456 | { |
| 457 | |
| 458 | h2_proxy_ngheader *ngh; |
| 459 | size_t n; |
| 460 | |
| 461 | n = 0; |
| 462 | apr_table_do(count_header, &n, headers, NULL); |
| 463 | |
| 464 | ngh = apr_pcalloc(p, sizeof(h2_proxy_ngheader)); |
| 465 | ngh->nv = apr_pcalloc(p, n * sizeof(nghttp2_nv)); |
| 466 | apr_table_do(add_table_header, ngh, headers, NULL); |
| 467 | |
| 468 | return ngh; |
| 469 | } |
| 470 | |
| 471 | /******************************************************************************* |
| 472 | * header HTTP/1 <-> HTTP/2 conversions |