<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16 Jan 2023, at 17:27, Sergey Kandaurov <<a href="mailto:pluknet@nginx.com" class="">pluknet@nginx.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""># HG changeset patch<br class=""># User Sergey Kandaurov <<a href="mailto:pluknet@nginx.com" class="">pluknet@nginx.com</a>><br class=""># Date 1673875616 -14400<br class="">#      Mon Jan 16 17:26:56 2023 +0400<br class=""># Branch quic<br class=""># Node ID f7c7cabe232898db5b16a142163de71964cebcfd<br class=""># Parent  6bb884dc72916dc675df65d02abee0c9cfabc916<br class="">QUIC: defer setting the active flag for client stream events.<br class=""><br class="">Specifically, now it is kept unset until streams are initialized.<br class="">Notably, this unbreaks OCSP with client certificates after 35e27117b593.<br class="">Previously, the read event could be posted prematurely in ngx_quic_set_event()<br class="">e.g., as part of handling a STREAM frame.<br class=""><br class="">diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c<br class="">--- a/src/event/quic/ngx_event_quic_streams.c<br class="">+++ b/src/event/quic/ngx_event_quic_streams.c<br class="">@@ -106,6 +106,13 @@ ngx_quic_open_stream(ngx_connection_t *c<br class="">         return NULL;<br class="">     }<br class=""><br class="">+    nqs->connection->write->active = 1;<br class="">+    nqs->connection->write->ready = 1;<br class="">+<br class="">+    if (!bidi) {<br class=""></div></div></blockquote><div><br class=""></div><div>if (bidi) ?</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">+        nqs->connection->read->active = 1;<br class="">+    }</div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="">+<br class="">     return nqs->connection;<br class=""></div></div></blockquote><div><br class=""></div><div>This could've been simplified by adding a variable for nqs->connection, YMMV.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""> }<br class=""><br class="">@@ -534,6 +541,13 @@ ngx_quic_init_stream_handler(ngx_event_t<br class=""><br class="">     ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic init stream");<br class=""><br class="">+    if ((qs->id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0) {<br class="">+        c->write->active = 1;<br class="">+        c->write->ready = 1;<br class="">+    }<br class="">+<br class="">+    c->read->active = 1;<br class="">+<br class="">     ngx_queue_remove(&qs->queue);<br class=""><br class="">     c->listening->handler(c);<br class="">@@ -704,19 +718,6 @@ ngx_quic_create_stream(ngx_connection_t <br class=""><br class="">     log->connection = sc->number;<br class=""><br class="">-    if ((id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0<br class="">-        || (id & NGX_QUIC_STREAM_SERVER_INITIATED))<br class="">-    {<br class="">-        sc->write->active = 1;<br class="">-        sc->write->ready = 1;<br class="">-    }<br class="">-<br class="">-    if ((id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0<br class="">-        || (id & NGX_QUIC_STREAM_SERVER_INITIATED) == 0)<br class="">-    {<br class="">-        sc->read->active = 1;<br class="">-    }<br class="">-<br class="">     if (id & NGX_QUIC_STREAM_UNIDIRECTIONAL) {<br class="">         if (id & NGX_QUIC_STREAM_SERVER_INITIATED) {<br class="">             qs->send_max_data = qc->ctp.initial_max_stream_data_uni;<br class="">_______________________________________________<br class="">nginx-devel mailing list<br class=""><a href="mailto:nginx-devel@nginx.org" class="">nginx-devel@nginx.org</a><br class="">https://mailman.nginx.org/mailman/listinfo/nginx-devel<br class=""></div></div></blockquote></div><div><br class=""></div><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>----</div><div>Roman Arutyunyan</div><div><a href="mailto:arut@nginx.com" class="">arut@nginx.com</a></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">

</div>
<br class=""></body></html>