diff --git a/lib/nghttp3_conn.c b/lib/nghttp3_conn.c index 1f6c857..0f04e94 100644 --- a/lib/nghttp3_conn.c +++ b/lib/nghttp3_conn.c @@ -434,6 +434,10 @@ nghttp3_ssize nghttp3_conn_read_stream(nghttp3_conn *conn, int64_t stream_id, return rv; } } + } else if(!nghttp3_stream_uni(stream_id)) { + /* server does not expect to receive new server initiated + bidirectional stream from client. */ + return NGHTTP3_ERR_H3_STREAM_CREATION_ERROR; } else { /* unidirectional stream */ if (srclen == 0 && fin) {