<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1033728349;
        mso-list-type:hybrid;
        mso-list-template-ids:-280622030 -1875608294 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F06E ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7 ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7 ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7 ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Look good to me.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<br>
Dmitry<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">nginx-devel <nginx-devel-bounces@nginx.org> on behalf of Sergey Kandaurov <pluknet@nginx.com><br>
<b>Date: </b>Friday, June 23, 2023 at 3:02 AM<br>
<b>To: </b>nginx-devel@nginx.org <nginx-devel@nginx.org><br>
<b>Subject: </b>Re: [PATCH] HTTP/3: fixed $body_bytes_sent<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">EXTERNAL MAIL: nginx-devel-bounces@nginx.org<br>
<br>
> On 20 Jun 2023, at 17:43, Sergey Kandaurov <pluknet@nginx.com> wrote:<br>
> <br>
> # HG changeset patch<br>
> # User Sergey Kandaurov <pluknet@nginx.com><br>
> # Date 1687268079 -14400<br>
> #      Tue Jun 20 17:34:39 2023 +0400<br>
> # Node ID a95bffe430283bf25341ad9745ffe1199e7c2190<br>
> # Parent  bf4bd5af4d7fdadab83616be9218604b658e3d84<br>
> HTTP/3: fixed $body_bytes_sent.<br>
> <br>
> diff --git a/src/http/v3/ngx_http_v3_filter_module.c b/src/http/v3/ngx_http_v3_filter_module.c<br>
> --- a/src/http/v3/ngx_http_v3_filter_module.c<br>
> +++ b/src/http/v3/ngx_http_v3_filter_module.c<br>
> @@ -540,6 +540,8 @@ ngx_http_v3_header_filter(ngx_http_reque<br>
>     *ll = hl;<br>
>     ll = &cl->next;<br>
> <br>
> +    r->header_size = n + (b->last - b->pos);<br>
> +<br>
>     if (r->headers_out.content_length_n >= 0<br>
>         && !r->header_only && !r->expect_trailers)<br>
>     {<br>
<br>
This variant of the patch additionally cuts off the first (and only) DATA<br>
frame header length from the variable value.  This better matches HTTP/1.1<br>
non-"chunked transfer encoding" behaviour, when the content length is known<br>
and no trailers expected.  Else, when chunked is used, all DATA-frame header<br>
lengths (and trailers) are included similar to HTTP/1.1.<br>
<br>
# HG changeset patch<br>
# User Sergey Kandaurov <pluknet@nginx.com><br>
# Date 1687514427 -14400<br>
#      Fri Jun 23 14:00:27 2023 +0400<br>
# Node ID c681f4906d838ac45b517fada4c4274ade03fd3c<br>
# Parent  77c1418916f7817a0d020f28d8a08f278a12fe43<br>
HTTP/3: fixed $body_bytes_sent.<br>
<br>
diff --git a/src/http/v3/ngx_http_v3_filter_module.c b/src/http/v3/ngx_http_v3_filter_module.c<br>
--- a/src/http/v3/ngx_http_v3_filter_module.c<br>
+++ b/src/http/v3/ngx_http_v3_filter_module.c<br>
@@ -581,6 +581,7 @@ ngx_http_v3_header_filter(ngx_http_reque<br>
 <br>
     for (cl = out; cl; cl = cl->next) {<br>
         h3c->total_bytes += cl->buf->last - cl->buf->pos;<br>
+        r->header_size += cl->buf->last - cl->buf->pos;<br>
     }<br>
 <br>
     return ngx_http_write_filter(r, out);<br>
<br>
-- <br>
Sergey Kandaurov<br>
_______________________________________________<br>
nginx-devel mailing list<br>
nginx-devel@nginx.org<br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx-devel">https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx-devel&data=05%7C01%7Cd.plotnikov%40f5.com%7C33b0174f73f5418697c708db73d0eb25%7Cdd3dfd2f6a3b40d19be0bf8327d81c50%7C0%7C0%7C638231113373934840%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GzcQTuRhnL77VlQgxEEzCqQU2VFNl3yKXbNyDKTmzjA%3D&reserved=0</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>