• Home
  • Raw
  • Download

Lines Matching refs:hd

126   auto hd = stream->handler;  in stream_timeout_cb()  local
127 auto config = hd->get_config(); in stream_timeout_cb()
129 ev_timer_stop(hd->get_loop(), &stream->rtimer); in stream_timeout_cb()
130 ev_timer_stop(hd->get_loop(), &stream->wtimer); in stream_timeout_cb()
133 print_session_id(hd->session_id()); in stream_timeout_cb()
138 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in stream_timeout_cb()
140 rv = hd->on_write(); in stream_timeout_cb()
142 delete_handler(hd); in stream_timeout_cb()
149 auto hd = stream->handler; in add_stream_read_timeout() local
150 ev_timer_again(hd->get_loop(), &stream->rtimer); in add_stream_read_timeout()
156 auto hd = stream->handler; in add_stream_read_timeout_if_pending() local
158 ev_timer_again(hd->get_loop(), &stream->rtimer); in add_stream_read_timeout_if_pending()
165 auto hd = stream->handler; in add_stream_write_timeout() local
166 ev_timer_again(hd->get_loop(), &stream->wtimer); in add_stream_write_timeout()
172 auto hd = stream->handler; in remove_stream_read_timeout() local
173 ev_timer_stop(hd->get_loop(), &stream->rtimer); in remove_stream_read_timeout()
179 auto hd = stream->handler; in remove_stream_write_timeout() local
180 ev_timer_stop(hd->get_loop(), &stream->wtimer); in remove_stream_write_timeout()
488 void on_session_closed(Http2Handler *hd, int64_t session_id) { in on_session_closed() argument
489 if (hd->get_config()->verbose) { in on_session_closed()
500 auto hd = static_cast<Http2Handler *>(w->data); in settings_timeout_cb() local
501 hd->terminate_session(NGHTTP2_SETTINGS_TIMEOUT); in settings_timeout_cb()
502 rv = hd->on_write(); in settings_timeout_cb()
504 delete_handler(hd); in settings_timeout_cb()
1094 auto hd = static_cast<Http2Handler *>(user_data); in file_read_callback() local
1095 auto stream = hd->get_stream(stream_id); in file_read_callback()
1105 auto config = hd->get_config(); in file_read_callback()
1126 hd->submit_rst_stream(stream, NGHTTP2_NO_ERROR); in file_read_callback()
1134 void prepare_status_response(Stream *stream, Http2Handler *hd, int status) { in prepare_status_response() argument
1135 auto sessions = hd->get_sessions(); in prepare_status_response()
1152 hd->submit_response(StringRef{status_page->status}, stream->stream_id, in prepare_status_response()
1158 void prepare_echo_response(Stream *stream, Http2Handler *hd) { in prepare_echo_response() argument
1161 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in prepare_echo_response()
1166 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in prepare_echo_response()
1176 if (!hd->get_config()->no_content_length) { in prepare_echo_response()
1181 hd->submit_response(StringRef::from_lit("200"), stream->stream_id, headers, in prepare_echo_response()
1187 bool prepare_upload_temp_store(Stream *stream, Http2Handler *hd) { in prepare_upload_temp_store() argument
1188 auto sessions = hd->get_sessions(); in prepare_upload_temp_store()
1207 void prepare_redirect_response(Stream *stream, Http2Handler *hd, in prepare_redirect_response() argument
1221 auto sessions = hd->get_sessions(); in prepare_redirect_response()
1224 hd->submit_response(StringRef{status_page->status}, stream->stream_id, in prepare_redirect_response()
1230 void prepare_response(Stream *stream, Http2Handler *hd, in prepare_response() argument
1235 prepare_status_response(stream, hd, 405); in prepare_response()
1262 auto sessions = hd->get_sessions(); in prepare_response()
1280 prepare_status_response(stream, hd, 404); in prepare_response()
1284 if (!hd->get_config()->push.empty()) { in prepare_response()
1285 auto push_itr = hd->get_config()->push.find(path.str()); in prepare_response()
1286 if (allow_push && push_itr != std::end(hd->get_config()->push)) { in prepare_response()
1288 rv = hd->submit_push_promise(stream, StringRef{push_path}); in prepare_response()
1299 auto len = hd->get_config()->htdocs.size() + path.size(); in prepare_response()
1310 auto &htdocs = hd->get_config()->htdocs; in prepare_response()
1320 prepare_echo_response(stream, hd); in prepare_response()
1329 prepare_status_response(stream, hd, 404); in prepare_response()
1338 prepare_status_response(stream, hd, 404); in prepare_response()
1349 prepare_redirect_response(stream, hd, reqpath, 301); in prepare_response()
1362 const auto &mime_types = hd->get_config()->mime_types; in prepare_response()
1377 hd->submit_response(StringRef::from_lit("304"), stream->stream_id, nullptr); in prepare_response()
1384 hd->submit_file_response(StringRef::from_lit("200"), stream, in prepare_response()
1397 hd->submit_file_response(StringRef::from_lit("200"), stream, file_ent->mtime, in prepare_response()
1406 auto hd = static_cast<Http2Handler *>(user_data); in on_header_callback2() local
1411 if (hd->get_config()->verbose) { in on_header_callback2()
1412 print_session_id(hd->session_id()); in on_header_callback2()
1416 if (frame->hd.type != NGHTTP2_HEADERS || in on_header_callback2()
1420 auto stream = hd->get_stream(frame->hd.stream_id); in on_header_callback2()
1426 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in on_header_callback2()
1481 auto hd = static_cast<Http2Handler *>(user_data); in on_begin_headers_callback() local
1483 if (frame->hd.type != NGHTTP2_HEADERS || in on_begin_headers_callback()
1488 auto stream = std::make_unique<Stream>(hd, frame->hd.stream_id); in on_begin_headers_callback()
1492 hd->add_stream(frame->hd.stream_id, std::move(stream)); in on_begin_headers_callback()
1501 auto hd = static_cast<Http2Handler *>(user_data); in hd_on_frame_recv_callback() local
1502 if (hd->get_config()->verbose) { in hd_on_frame_recv_callback()
1503 print_session_id(hd->session_id()); in hd_on_frame_recv_callback()
1506 switch (frame->hd.type) { in hd_on_frame_recv_callback()
1509 auto stream = hd->get_stream(frame->hd.stream_id); in hd_on_frame_recv_callback()
1514 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in hd_on_frame_recv_callback()
1516 if (stream->echo_upload || !hd->get_config()->early_response) { in hd_on_frame_recv_callback()
1517 prepare_response(stream, hd); in hd_on_frame_recv_callback()
1526 auto stream = hd->get_stream(frame->hd.stream_id); in hd_on_frame_recv_callback()
1536 hd->submit_non_final_response("100", frame->hd.stream_id); in hd_on_frame_recv_callback()
1540 if (hd->get_config()->echo_upload && in hd_on_frame_recv_callback()
1543 if (!prepare_upload_temp_store(stream, hd)) { in hd_on_frame_recv_callback()
1544 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in hd_on_frame_recv_callback()
1547 } else if (hd->get_config()->early_response) { in hd_on_frame_recv_callback()
1548 prepare_response(stream, hd); in hd_on_frame_recv_callback()
1552 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in hd_on_frame_recv_callback()
1554 if (stream->echo_upload || !hd->get_config()->early_response) { in hd_on_frame_recv_callback()
1555 prepare_response(stream, hd); in hd_on_frame_recv_callback()
1564 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in hd_on_frame_recv_callback()
1565 hd->remove_settings_timer(); in hd_on_frame_recv_callback()
1578 auto hd = static_cast<Http2Handler *>(user_data); in hd_on_frame_send_callback() local
1580 if (hd->get_config()->verbose) { in hd_on_frame_send_callback()
1581 print_session_id(hd->session_id()); in hd_on_frame_send_callback()
1585 switch (frame->hd.type) { in hd_on_frame_send_callback()
1588 auto stream = hd->get_stream(frame->hd.stream_id); in hd_on_frame_send_callback()
1594 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in hd_on_frame_send_callback()
1597 session, frame->hd.stream_id), in hd_on_frame_send_callback()
1610 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in hd_on_frame_send_callback()
1614 hd->start_settings_timer(); in hd_on_frame_send_callback()
1620 auto promised_stream = hd->get_stream(promised_stream_id); in hd_on_frame_send_callback()
1621 auto stream = hd->get_stream(frame->hd.stream_id); in hd_on_frame_send_callback()
1630 prepare_response(promised_stream, hd, /*allow_push */ false); in hd_on_frame_send_callback()
1641 auto hd = static_cast<Http2Handler *>(user_data); in send_data_callback() local
1642 auto wb = hd->get_wb(); in send_data_callback()
1644 auto stream = hd->get_stream(frame->hd.stream_id); in send_data_callback()
1693 auto hd = static_cast<Http2Handler *>(user_data); in select_padding_callback() local
1694 return std::min(max_payload, frame->hd.length + hd->get_config()->padding); in select_padding_callback()
1702 auto hd = static_cast<Http2Handler *>(user_data); in on_data_chunk_recv_callback() local
1703 auto stream = hd->get_stream(stream_id); in on_data_chunk_recv_callback()
1717 hd->submit_rst_stream(stream, NGHTTP2_INTERNAL_ERROR); in on_data_chunk_recv_callback()
1735 auto hd = static_cast<Http2Handler *>(user_data); in on_stream_close_callback() local
1736 hd->remove_stream(stream_id); in on_stream_close_callback()
1737 if (hd->get_config()->verbose) { in on_stream_close_callback()
1738 print_session_id(hd->session_id()); in on_stream_close_callback()