| 586 | } |
| 587 | |
| 588 | static int on_header(nghttp2_session *ngh2, const nghttp2_frame *frame, |
| 589 | const uint8_t *namearg, size_t nlen, |
| 590 | const uint8_t *valuearg, size_t vlen, uint8_t flags, |
| 591 | void *user_data) |
| 592 | { |
| 593 | h2_proxy_session *session = user_data; |
| 594 | h2_proxy_stream *stream; |
| 595 | const char *n = (const char*)namearg; |
| 596 | const char *v = (const char*)valuearg; |
| 597 | |
| 598 | (void)session; |
| 599 | if (frame->hd.type == NGHTTP2_HEADERS && nlen) { |
| 600 | stream = nghttp2_session_get_stream_user_data(ngh2, frame->hd.stream_id); |
| 601 | if (stream) { |
| 602 | if (h2_proxy_stream_add_header_out(stream, n, nlen, v, vlen)) { |
| 603 | return NGHTTP2_ERR_CALLBACK_FAILURE; |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | else if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { |
| 608 | } |
| 609 | |
| 610 | return 0; |
| 611 | } |
| 612 | |
| 613 | static ssize_t stream_request_data(nghttp2_session *ngh2, int32_t stream_id, |
| 614 | uint8_t *buf, size_t length, |
nothing calls this directly
no test coverage detected