/third_party/curl/lib/vquic/ |
D | quiche.c | 631 quiche_h3_header *nva = NULL; in http_request() local 653 nva = malloc(sizeof(quiche_h3_header) * nheader); in http_request() 654 if(!nva) { in http_request() 671 nva[0].name = (unsigned char *)":method"; in http_request() 672 nva[0].name_len = strlen((char *)nva[0].name); in http_request() 673 nva[0].value = (unsigned char *)hdbuf; in http_request() 674 nva[0].value_len = (size_t)(end - hdbuf); in http_request() 688 nva[1].name = (unsigned char *)":path"; in http_request() 689 nva[1].name_len = strlen((char *)nva[1].name); in http_request() 690 nva[1].value = (unsigned char *)hdbuf; in http_request() [all …]
|
D | ngtcp2.c | 1401 nghttp3_nv *nva = NULL; in http_request() local 1433 nva = malloc(sizeof(nghttp3_nv) * nheader); in http_request() 1434 if(!nva) { in http_request() 1451 nva[0].name = (unsigned char *)":method"; in http_request() 1452 nva[0].namelen = strlen((char *)nva[0].name); in http_request() 1453 nva[0].value = (unsigned char *)hdbuf; in http_request() 1454 nva[0].valuelen = (size_t)(end - hdbuf); in http_request() 1455 nva[0].flags = NGHTTP3_NV_FLAG_NONE; in http_request() 1469 nva[1].name = (unsigned char *)":path"; in http_request() 1470 nva[1].namelen = strlen((char *)nva[1].name); in http_request() [all …]
|
/third_party/nghttp2/tests/ |
D | nghttp2_hd_test.c | 70 assert_nv_equal(nva1, out.nva, 3, mem); in test_nghttp2_hd_deflate() 84 assert_nv_equal(nva2, out.nva, 2, mem); in test_nghttp2_hd_deflate() 99 assert_nv_equal(nva3, out.nva, 3, mem); in test_nghttp2_hd_deflate() 113 assert_nv_equal(nva4, out.nva, 3, mem); in test_nghttp2_hd_deflate() 127 assert_nv_equal(nva5, out.nva, 2, mem); in test_nghttp2_hd_deflate() 166 assert_nv_equal(nva1, out.nva, 2, mem); in test_nghttp2_hd_deflate_same_indexed_repr() 180 assert_nv_equal(nva2, out.nva, 3, mem); in test_nghttp2_hd_deflate_same_indexed_repr() 214 assert_nv_equal(&nv, out.nva, 1, mem); in test_nghttp2_hd_inflate_indexed() 260 assert_nv_equal(&nv[i], out.nva, 1, mem); in test_nghttp2_hd_inflate_indname_noinc() 295 assert_nv_equal(&nv, out.nva, 1, mem); in test_nghttp2_hd_inflate_indname_inc() [all …]
|
D | nghttp2_frame_test.c | 51 nghttp2_nv *nva = mem->malloc(sizeof(nghttp2_nv) * HEADERS_LENGTH, NULL); in headers() local 52 nva[0] = make_nv("method", "GET"); in headers() 53 nva[1] = make_nv("scheme", "https"); in headers() 54 nva[2] = make_nv("url", "/"); in headers() 55 nva[3] = make_nv("x-head", "foo"); in headers() 56 nva[4] = make_nv("x-head", "bar"); in headers() 57 nva[5] = make_nv("version", "HTTP/1.1"); in headers() 58 nva[6] = make_nv("x-empty", ""); in headers() 59 return nva; in headers() 76 nghttp2_nv *nva; in test_nghttp2_frame_pack_headers() local [all …]
|
D | nghttp2_test_helper.c | 118 memset(out->nva, 0, sizeof(out->nva)); in nva_out_init() 125 mem->free(out->nva[i].name, NULL); in nva_out_reset() 126 mem->free(out->nva[i].value, NULL); in nva_out_reset() 128 memset(out->nva, 0, sizeof(out->nva)); in nva_out_reset() 133 nghttp2_nv *onv = &out->nva[out->nvlen]; in add_out() 213 int32_t stream_id, uint8_t flags, const nghttp2_nv *nva, in pack_headers() argument 219 nghttp2_nv_array_copy(&dnva, nva, nvlen, mem); in pack_headers() 232 int32_t promised_stream_id, const nghttp2_nv *nva, in pack_push_promise() argument 238 nghttp2_nv_array_copy(&dnva, nva, nvlen, mem); in pack_push_promise()
|
D | failmalloc_test.c | 289 nghttp2_nv *nva; in run_nghttp2_session_recv() local 341 nghttp2_nv_array_copy(&nva, nv, nvlen, nghttp2_mem_fm()); in run_nghttp2_session_recv() 343 NGHTTP2_HCAT_REQUEST, NULL, nva, nvlen); in run_nghttp2_session_recv() 402 nghttp2_nv *nva; in run_nghttp2_frame_pack_headers() local 420 rv = nghttp2_nv_array_copy(&nva, nv, nvlen, nghttp2_mem_fm()); in run_nghttp2_frame_pack_headers() 425 NGHTTP2_HCAT_REQUEST, NULL, nva, nvlen); in run_nghttp2_frame_pack_headers() 502 nghttp2_nv *nva, size_t nvlen, nghttp2_mem *mem) { in deflate_inflate() argument 505 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, nva, nvlen); in deflate_inflate()
|
/third_party/nghttp2/src/ |
D | shrpx_http2_downstream_connection.cc | 203 std::vector<nghttp2_nv> nva; in http2_data_read_callback() local 204 nva.reserve(trailers.size()); in http2_data_read_callback() 205 http2::copy_headers_to_nva_nocopy(nva, trailers, http2::HDOP_STRIP_ALL); in http2_data_read_callback() 206 if (!nva.empty()) { in http2_data_read_callback() 207 rv = nghttp2_submit_trailer(session, stream_id, nva.data(), nva.size()); in http2_data_read_callback() 292 auto nva = std::vector<nghttp2_nv>(); in push_request_headers() local 293 nva.reserve(req.fs.headers().size() + 11 + num_cookies + in push_request_headers() 297 nva.push_back(http2::make_nv_ll(":method", "CONNECT")); in push_request_headers() 298 nva.push_back(http2::make_nv_ll(":protocol", "websocket")); in push_request_headers() 300 nva.push_back(http2::make_nv_ls_nocopy( in push_request_headers() [all …]
|
D | deflatehd.cc | 80 const std::vector<nghttp2_nv> &nva, int seq) { in output_to_json() argument 97 json_object_set_new(obj, "headers", dump_headers(nva.data(), nva.size())); in output_to_json() 113 const std::vector<nghttp2_nv> &nva, size_t inputlen, in deflate_hd() argument 119 (nghttp2_nv *)nva.data(), nva.size()); in deflate_hd() 128 output_to_json(deflater, buf.data(), rv, inputlen, nva, seq); in deflate_hd() 146 auto nva = std::vector<nghttp2_nv>(len); in deflate_hd_json() local 159 nva[i].name = (uint8_t *)name; in deflate_hd_json() 160 nva[i].namelen = strlen(name); in deflate_hd_json() 167 nva[i].value = (uint8_t *)json_string_value(value); in deflate_hd_json() 168 nva[i].valuelen = strlen(json_string_value(value)); in deflate_hd_json() [all …]
|
D | http2_test.cc | 58 auto nva = Headers(); in test_http2_add_header() local 60 http2::add_header(nva, (const uint8_t *)"alpha", 5, (const uint8_t *)"123", 3, in test_http2_add_header() 62 CU_ASSERT(Headers::value_type("alpha", "123") == nva[0]); in test_http2_add_header() 63 CU_ASSERT(!nva[0].no_index); in test_http2_add_header() 65 nva.clear(); in test_http2_add_header() 67 http2::add_header(nva, (const uint8_t *)"alpha", 5, (const uint8_t *)"", 0, in test_http2_add_header() 69 CU_ASSERT(Headers::value_type("alpha", "") == nva[0]); in test_http2_add_header() 70 CU_ASSERT(nva[0].no_index); in test_http2_add_header() 72 nva.clear(); in test_http2_add_header() 74 http2::add_header(nva, (const uint8_t *)"a", 1, (const uint8_t *)" b", 2, in test_http2_add_header() [all …]
|
D | asio_server_http2_handler.cc | 342 auto nva = std::vector<nghttp2_nv>(); in start_response() local 343 nva.reserve(2 + header.size()); in start_response() 346 nva.push_back(nghttp2::http2::make_nv_ls(":status", status)); in start_response() 347 nva.push_back(nghttp2::http2::make_nv_ls("date", date)); in start_response() 349 nva.push_back(nghttp2::http2::make_nv(hd.first, hd.second.value, in start_response() 366 rv = nghttp2_submit_response(session_, strm.get_stream_id(), nva.data(), in start_response() 367 nva.size(), prd_ptr); in start_response() 380 auto nva = std::vector<nghttp2_nv>(); in submit_trailer() local 381 nva.reserve(h.size()); in submit_trailer() 383 nva.push_back(nghttp2::http2::make_nv(hd.first, hd.second.value, in submit_trailer() [all …]
|
D | shrpx_http2_upstream.cc | 319 auto &nva = req.fs.headers(); in on_request_headers() local 323 for (auto &nv : nva) { in on_request_headers() 339 http2::dump_nv(dump.request_header, nva); in on_request_headers() 731 auto &nv = frame->push_promise.nva[i]; in on_frame_send_callback() 1470 std::vector<nghttp2_nv> nva; in downstream_data_read_callback() local 1471 nva.reserve(trailers.size()); in downstream_data_read_callback() 1472 http2::copy_headers_to_nva_nocopy(nva, trailers, http2::HDOP_STRIP_ALL); in downstream_data_read_callback() 1473 if (!nva.empty()) { in downstream_data_read_callback() 1474 rv = nghttp2_submit_trailer(session, stream_id, nva.data(), in downstream_data_read_callback() 1475 nva.size()); in downstream_data_read_callback() [all …]
|
D | http2.h | 123 void add_header(Headers &nva, const uint8_t *name, size_t namelen, 130 const Headers::value_type *get_header(const Headers &nva, const char *name); 231 void copy_headers_to_nva(std::vector<nghttp2_nv> &nva, 236 void copy_headers_to_nva_nocopy(std::vector<nghttp2_nv> &nva, 263 void dump_nv(FILE *out, const nghttp2_nv *nva, size_t nvlen); 266 void dump_nv(FILE *out, const Headers &nva); 268 void dump_nv(FILE *out, const HeaderRefs &nva); 362 const Headers &nva); 365 Headers &nva);
|
D | comp_helper.c | 112 json_t *dump_headers(const nghttp2_nv *nva, size_t nvlen) { in dump_headers() argument 118 json_array_append_new(headers, dump_header(nva[i].name, nva[i].namelen, in dump_headers() 119 nva[i].value, nva[i].valuelen)); in dump_headers()
|
D | asio_client_session_impl.cc | 407 auto nva = std::vector<nghttp2_nv>(); in write_trailer() local 408 nva.reserve(h.size()); in write_trailer() 410 nva.push_back(nghttp2::http2::make_nv(hd.first, hd.second.value, in write_trailer() 414 rv = nghttp2_submit_trailer(session_, strm.stream_id(), nva.data(), in write_trailer() 415 nva.size()); in write_trailer() 533 auto nva = std::vector<nghttp2_nv>(); in submit() local 534 nva.reserve(4 + h.size()); in submit() 535 nva.push_back(http2::make_nv_ls(":method", method)); in submit() 536 nva.push_back(http2::make_nv_ls(":scheme", uref.scheme)); in submit() 537 nva.push_back(http2::make_nv_ls(":path", path)); in submit() [all …]
|
D | http2.cc | 289 void add_header(Headers &nva, const uint8_t *name, size_t namelen, in add_header() argument 301 nva.push_back(to_header(name, namelen, value, valuelen, no_index, token)); in add_header() 304 const Headers::value_type *get_header(const Headers &nva, const char *name) { in get_header() argument 306 for (auto &nv : nva) { in get_header() 369 void copy_headers_to_nva_internal(std::vector<nghttp2_nv> &nva, in copy_headers_to_nva_internal() argument 462 nva.push_back( in copy_headers_to_nva_internal() 468 void copy_headers_to_nva(std::vector<nghttp2_nv> &nva, in copy_headers_to_nva() argument 470 copy_headers_to_nva_internal(nva, headers, NGHTTP2_NV_FLAG_NONE, flags); in copy_headers_to_nva() 473 void copy_headers_to_nva_nocopy(std::vector<nghttp2_nv> &nva, in copy_headers_to_nva_nocopy() argument 476 nva, headers, in copy_headers_to_nva_nocopy() [all …]
|
D | app_helper.cc | 154 void print_nv(nghttp2_nv *nva, size_t nvlen) { in print_nv() argument 155 auto end = nva + nvlen; in print_nv() 156 for (; nva != end; ++nva) { in print_nv() 159 print_nv(nva); in print_nv() 294 print_nv(frame->headers.nva, frame->headers.nvlen); in print_frame() 325 print_nv(frame->push_promise.nva, frame->push_promise.nvlen); in print_frame()
|
/third_party/nghttp2/examples/ |
D | deflate.c | 41 nghttp2_hd_inflater *inflater, const nghttp2_nv *const nva, 94 nghttp2_hd_inflater *inflater, const nghttp2_nv *const nva, in deflate() argument 106 sum += nva[i].namelen + nva[i].valuelen; in deflate() 112 fwrite(nva[i].name, 1, nva[i].namelen, stdout); in deflate() 114 fwrite(nva[i].value, 1, nva[i].valuelen, stdout); in deflate() 118 buflen = nghttp2_hd_deflate_bound(deflater, nva, nvlen); in deflate() 121 rv = nghttp2_hd_deflate_hd(deflater, buf, buflen, nva, nvlen); in deflate()
|
D | client.c | 226 const nghttp2_nv *nva = frame->headers.nva; in on_frame_send_callback() local 229 fwrite(nva[i].name, 1, nva[i].namelen, stdout); in on_frame_send_callback() 231 fwrite(nva[i].value, 1, nva[i].valuelen, stdout); in on_frame_send_callback() 254 const nghttp2_nv *nva = frame->headers.nva; in on_frame_recv_callback() local 260 fwrite(nva[i].name, 1, nva[i].namelen, stdout); in on_frame_recv_callback() 262 fwrite(nva[i].value, 1, nva[i].valuelen, stdout); in on_frame_recv_callback() 479 const nghttp2_nv nva[] = {MAKE_NV(":method", "GET"), in submit_request() local 486 stream_id = nghttp2_submit_request(connection->session, NULL, nva, in submit_request() 487 sizeof(nva) / sizeof(nva[0]), NULL, req); in submit_request()
|
/third_party/node/deps/nghttp2/lib/ |
D | nghttp2_frame.c | 65 nghttp2_nv *nva, size_t nvlen) { in nghttp2_frame_headers_init() argument 68 frame->nva = nva; in nghttp2_frame_headers_init() 80 nghttp2_nv_array_del(frame->nva, mem); in nghttp2_frame_headers_free() 116 nghttp2_nv *nva, size_t nvlen) { in nghttp2_frame_push_promise_init() argument 119 frame->nva = nva; in nghttp2_frame_push_promise_init() 127 nghttp2_nv_array_del(frame->nva, mem); in nghttp2_frame_push_promise_free() 352 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers() 404 frame->nva = NULL; in nghttp2_frame_unpack_headers_payload() 550 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_push_promise() 574 frame->nva = NULL; in nghttp2_frame_unpack_push_promise_payload() [all …]
|
D | nghttp2_submit.c | 145 const nghttp2_nv *nva, size_t nvlen, in submit_headers_shared_nva() argument 162 rv = nghttp2_nv_array_copy(&nva_copy, nva, nvlen, mem); in submit_headers_shared_nva() 172 const nghttp2_nv *nva, size_t nvlen) { in nghttp2_submit_trailer() argument 178 stream_id, NULL, nva, nvlen, NULL, in nghttp2_submit_trailer() 185 const nghttp2_nv *nva, size_t nvlen, in nghttp2_submit_headers() argument 210 return submit_headers_shared_nva(session, flags, stream_id, pri_spec, nva, in nghttp2_submit_headers() 311 int32_t stream_id, const nghttp2_nv *nva, in nghttp2_submit_push_promise() argument 349 rv = nghttp2_nv_array_copy(&nva_copy, nva, nvlen, mem); in nghttp2_submit_push_promise() 683 const nghttp2_nv *nva, size_t nvlen, in nghttp2_submit_request() argument 704 return submit_headers_shared_nva(session, flags, -1, pri_spec, nva, nvlen, in nghttp2_submit_request() [all …]
|
D | nghttp2_frame.h | 434 nghttp2_nv *nva, size_t nvlen); 455 nghttp2_nv *nva, size_t nvlen); 566 void nghttp2_nv_array_sort(nghttp2_nv *nva, size_t nvlen); 583 int nghttp2_nv_array_copy(nghttp2_nv **nva_ptr, const nghttp2_nv *nva, 596 void nghttp2_nv_array_del(nghttp2_nv *nva, nghttp2_mem *mem);
|
/third_party/nghttp2/lib/ |
D | nghttp2_frame.c | 65 nghttp2_nv *nva, size_t nvlen) { in nghttp2_frame_headers_init() argument 68 frame->nva = nva; in nghttp2_frame_headers_init() 80 nghttp2_nv_array_del(frame->nva, mem); in nghttp2_frame_headers_free() 116 nghttp2_nv *nva, size_t nvlen) { in nghttp2_frame_push_promise_init() argument 119 frame->nva = nva; in nghttp2_frame_push_promise_init() 127 nghttp2_nv_array_del(frame->nva, mem); in nghttp2_frame_push_promise_free() 352 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers() 404 frame->nva = NULL; in nghttp2_frame_unpack_headers_payload() 550 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_push_promise() 574 frame->nva = NULL; in nghttp2_frame_unpack_push_promise_payload() [all …]
|
D | nghttp2_submit.c | 145 const nghttp2_nv *nva, size_t nvlen, in submit_headers_shared_nva() argument 162 rv = nghttp2_nv_array_copy(&nva_copy, nva, nvlen, mem); in submit_headers_shared_nva() 172 const nghttp2_nv *nva, size_t nvlen) { in nghttp2_submit_trailer() argument 178 stream_id, NULL, nva, nvlen, NULL, in nghttp2_submit_trailer() 185 const nghttp2_nv *nva, size_t nvlen, in nghttp2_submit_headers() argument 210 return submit_headers_shared_nva(session, flags, stream_id, pri_spec, nva, in nghttp2_submit_headers() 311 int32_t stream_id, const nghttp2_nv *nva, in nghttp2_submit_push_promise() argument 349 rv = nghttp2_nv_array_copy(&nva_copy, nva, nvlen, mem); in nghttp2_submit_push_promise() 683 const nghttp2_nv *nva, size_t nvlen, in nghttp2_submit_request() argument 704 return submit_headers_shared_nva(session, flags, -1, pri_spec, nva, nvlen, in nghttp2_submit_request() [all …]
|
/third_party/node/src/ |
D | node_http_common-inl.h | 36 nv_t* const nva = reinterpret_cast<nv_t*>(start); in NgHeaders() local 52 nva[0].name = nva[0].value = &zero; in NgHeaders() 53 nva[0].namelen = nva[0].valuelen = 1; in NgHeaders() 58 nva[n].name = reinterpret_cast<uint8_t*>(p); in NgHeaders() 59 nva[n].namelen = strlen(p); in NgHeaders() 60 p += nva[n].namelen + 1; in NgHeaders() 61 nva[n].value = reinterpret_cast<uint8_t*>(p); in NgHeaders() 62 nva[n].valuelen = strlen(p); in NgHeaders() 63 p += nva[n].valuelen + 1; in NgHeaders() 64 nva[n].flags = *p; in NgHeaders()
|
/third_party/curl/lib/ |
D | http2.c | 1900 nghttp2_nv *nva = NULL; in http2_send() local 1981 nva = malloc(sizeof(nghttp2_nv) * nheader); in http2_send() 1982 if(!nva) { in http2_send() 1997 nva[0].name = (unsigned char *)":method"; in http2_send() 1998 nva[0].namelen = strlen((char *)nva[0].name); in http2_send() 1999 nva[0].value = (unsigned char *)hdbuf; in http2_send() 2000 nva[0].valuelen = (size_t)(end - hdbuf); in http2_send() 2001 nva[0].flags = NGHTTP2_NV_FLAG_NONE; in http2_send() 2002 if(HEADER_OVERFLOW(nva[0])) { in http2_send() 2019 nva[1].name = (unsigned char *)":path"; in http2_send() [all …]
|