Skip to content
Permalink
Browse files

Merge pull request #2231 from toru/h3-probe-instrumentation

Instrument H3 code path with req-level dtrace probes
  • Loading branch information
kazuho committed Jan 20, 2020
2 parents b998922 + 1313a3e commit 734ac567d95bd3c1e6ac5f3cf9510258881e01ea
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/http3/server.c
@@ -966,6 +966,7 @@ static int handle_input_expect_headers(struct st_h2o_http3_server_stream_t *stre
if (ret == H2O_HTTP2_ERROR_INVALID_HEADER_CHAR) {
if (!quicly_recvstate_transfer_complete(&stream->quic->recvstate))
quicly_request_stop(stream->quic, H2O_HTTP3_ERROR_EARLY_RESPONSE);
h2o_probe_log_request(&stream->req, stream->quic->stream_id);
h2o_send_error_400(&stream->req, "Invalid Request", *err_desc, 0);
*err_desc = NULL;
return 0;
@@ -974,6 +975,8 @@ static int handle_input_expect_headers(struct st_h2o_http3_server_stream_t *stre
if (header_ack_len != 0)
h2o_http3_send_qpack_header_ack(&conn->h3, header_ack, header_ack_len);

h2o_probe_log_request(&stream->req, stream->quic->stream_id);

/* check if content-length is within the permitted bounds */
if (stream->req.content_length != SIZE_MAX &&
stream->req.content_length > conn->super.ctx->globalconf->max_request_entity_size) {
@@ -1016,6 +1019,7 @@ static void do_send(h2o_ostream_t *_ostr, h2o_req_t *_req, h2o_sendvec_t *bufs,

if (stream->state == H2O_HTTP3_SERVER_STREAM_STATE_SEND_HEADERS) {
write_response(stream);
h2o_probe_log_response(&stream->req, stream->quic->stream_id);
set_state(stream, H2O_HTTP3_SERVER_STREAM_STATE_SEND_BODY);
} else {
assert(stream->state == H2O_HTTP3_SERVER_STREAM_STATE_SEND_BODY);

0 comments on commit 734ac56

Please sign in to comment.
You can’t perform that action at this time.