Skip to content
Snippets Groups Projects

doh2: refuse stream on failure

Merged Lukas Jezek requested to merge odvr-doh-assert into master
+ 3
2
@@ -304,6 +304,8 @@ static void http_status_reinit_error(struct http_ctx *ctx, int stream_id)
queue_pop(ctx->streams);
http_status_reinit(ctx, stream_id);
nghttp2_submit_rst_stream(ctx->h2, NGHTTP2_FLAG_NONE, stream_id, NGHTTP2_REFUSED_STREAM);
}
/*
@@ -534,10 +536,9 @@ static int data_chunk_recv_callback(nghttp2_session *h2, uint8_t flags, int32_t
struct http_ctx *ctx = (struct http_ctx *)user_data;
ssize_t remaining;
ssize_t required;
assert(ctx->current_stream);
bool is_first = queue_len(ctx->streams) == 0 || queue_tail(ctx->streams) != ctx->current_stream->stream_id;
if (ctx->current_stream->stream_id != stream_id) {
if (ctx->current_stream == NULL || ctx->current_stream->stream_id != stream_id) {
kr_log_verbose(
"[http] stream %d incomplete\n",
ctx->current_stream->stream_id);
Loading