]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: fixed decoder stream stubs.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 4 May 2021 10:38:59 +0000 (13:38 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 4 May 2021 10:38:59 +0000 (13:38 +0300)
Now ngx_http_v3_ack_header() and ngx_http_v3_inc_insert_count() always generate
decoder error.  Our implementation does not use dynamic tables and does not
expect client to send Section Acknowledgement or Insert Count Increment.

Stream Cancellation, on the other hand, is allowed to be sent anyway.  This is
why ngx_http_v3_cancel_stream() does not return an error.

src/http/v3/ngx_http_v3_tables.c

index 5389d0e2f4000a9283cc1620e15ae8e8755537c2..200e8a3969156d4e5b7d08edf224bf1bd17842c1 100644 (file)
@@ -390,9 +390,9 @@ ngx_http_v3_ack_header(ngx_connection_t *c, ngx_uint_t stream_id)
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
                    "http3 ack header %ui", stream_id);
 
-    /* XXX */
+    /* we do not use dynamic tables */
 
-    return NGX_OK;
+    return NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR;
 }
 
 
@@ -402,7 +402,7 @@ ngx_http_v3_cancel_stream(ngx_connection_t *c, ngx_uint_t stream_id)
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
                    "http3 cancel stream %ui", stream_id);
 
-    /* XXX */
+    /* we do not use dynamic tables */
 
     return NGX_OK;
 }
@@ -414,9 +414,9 @@ ngx_http_v3_inc_insert_count(ngx_connection_t *c, ngx_uint_t inc)
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
                    "http3 increment insert count %ui", inc);
 
-    /* XXX */
+    /* we do not use dynamic tables */
 
-    return NGX_OK;
+    return NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR;
 }