From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.88.254] (unknown [125.160.110.187]) by gnuweeb.org (Postfix) with ESMTPSA id 158DB8061E; Fri, 26 Aug 2022 01:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661478837; bh=xnzqze2YicgPFrIyst5pJ5v6oFUg9yqipYDy7aOKmOY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mkz7+YyNb/daO5dvX8kyX3X0bFn/D8ZiSKo9AvPkMRqDcRbeL1la9H3QMK0x51V9c 1pz2Uldn7s78spJoG6GTye5Tt1z9O92bxZsrOEAFibiPrO3GZGN6hiJAR9bNW+tblN JjsIzWso/cbyv3LCN/ik6i6PuDpgJtKDoogn/dcqOLlbsk0wgl8IWAYuoxGYefZW2Y ZIxmUSIrUc/UPKKXtfgIFVTfe+LwhvWjY6ZDoH0WnxZgv5WWBad0e2LIcjeMLLvCdW ejom51pd+BLYSnN8NbNrwROxe+ybD72dXfIEiMDxHiFGZWSfrgdM+w3LXRz88Wgotk w4AXX0l49pBVg== Message-ID: <8262e4f1-aead-70b7-bea7-8291a3316443@gnuweeb.org> Date: Fri, 26 Aug 2022 08:53:53 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [GIT PULL] ncns update (chunked request body support) Content-Language: en-US To: Alviro Iskandar Setiawan Cc: Kanna Scarlet , Muhammad Rizki , GNU/Weeb Mailing List References: <78e1a565-e450-61d8-47b3-87920131cfda@gnuweeb.org> <44ee99d2-d4e6-3638-89ce-152818a9a9bc@gnuweeb.org> From: Ammar Faizi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 8/26/22 8:39 AM, Alviro Iskandar Setiawan wrote: >> if you split the buffer in the middle of the queue, then you put the >> rest of the splitted buffer into the tail, then it may get skipped >> because the EOF mark can be queued earlier. Even if it doesn't hit EOF >> it's still wrong because the FIFO order is violated when the condition >> (c.len_ <= dst_len_) evaluates to true > better way you shouldn't pop the queue if you're running out of > destination buffer, you can wait for the next ReadInternal() call and > copy the rest uncopied bytes later time, only the deferring is a bit > tricky Ah well, finally got some light! I understand now, will rework this part later today. -- Ammar Faizi