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, NUMERIC_HTTP_ADDR,URIBL_BLOCKED,WEIRD_PORT 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 446228057F; Fri, 26 Aug 2022 08:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661501001; bh=30irHfPMJqusGQmKlTZ5k5xLInXAipwkvzEoThAD7LY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=lAG9UYMI65AsjopCCzCSOS6/XrztmWmQpKRoZH5vT8K5DBO6ld34pglqDYJfPEMY9 yqxhvTWQcCT+iGXb90cEX4+4oQlp9SjZhDWDQsPXlE6HjSJtC9eAYw2S8jy5eirv+o 9akyBoMaVbaFYhiiLNl1j2I/kMiL8HWJfDTbEXXB6ietW54Uwx6gF9AOUtdJs4vV23 jEN4sxcw422sxdfaDeBBlLZ9ZoMoX3Y5r6+EN46XR8h2b9verY81BMCHNXB/Q3kKFg DErJv7jKsfQeYguZ9AExSc/LxGj/YWJYrfjWWZQVf/rh30V3Jm8CLDKrhY4lEeID1d Jn3ZYow8u/Lmg== Content-Type: multipart/mixed; boundary="------------TwFbzkKQDfLWa37KeFz0Op0k" Message-ID: Date: Fri, 26 Aug 2022 15:03:15 +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> <8262e4f1-aead-70b7-bea7-8291a3316443@gnuweeb.org> From: Ammar Faizi In-Reply-To: List-Id: This is a multi-part message in MIME format. --------------TwFbzkKQDfLWa37KeFz0Op0k Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/26/22 1:24 PM, Ammar Faizi wrote: > On 8/26/22 8:53 AM, Ammar Faizi wrote: >> Ah well, finally got some light! >> >> I understand now, will rework this part later today. > > Did some experiment, but still stuck with larger buffer. The small > hot patch attached below. Now fixed, the incremental on top of my tree attached below. -- Ammar Faizi --------------TwFbzkKQDfLWa37KeFz0Op0k Content-Type: text/x-patch; charset=UTF-8; name="fix.diff" Content-Disposition: attachment; filename="fix.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2NobmV0L2NobmV0LmNjIGIvY2huZXQvY2huZXQuY2MKaW5kZXggMDkz NjYwYy4uMTQzMTU2MSAxMDA2NDQKLS0tIGEvY2huZXQvY2huZXQuY2MKKysrIGIvY2huZXQv Y2huZXQuY2MKQEAgLTU4LDEyICs1OCwxMSBAQCB2b2lkIENITmV0Q2h1bmtlZFBheWxvYWQ6 OkNsZWFyUGVuZGluZ1F1ZXVlKHZvaWQpCiAJX19tdXN0X2hvbGQoJmJ1Zl9sb2NrXykKIHsK IAl3aGlsZSAoIWJ1Zl9xdWV1ZV8uZW1wdHkoKSkgewotCQlzdHJ1Y3QgY2h1bmtfdmVjIGM7 CisJCXN0cnVjdCBjaHVua192ZWMgJmMgPSBidWZfcXVldWVfLmZyb250KCk7CiAKLQkJYyA9 IGJ1Zl9xdWV1ZV8uZnJvbnQoKTsKLQkJYnVmX3F1ZXVlXy5wb3AoKTsKIAkJaWYgKGMuYnVm XykKIAkJCWZyZWUoYy5idWZfKTsKKwkJYnVmX3F1ZXVlXy5wb3AoKTsKIAl9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