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 E01618057F; Fri, 26 Aug 2022 06:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661495102; bh=+AVExQeLXGYWPoH5H4JuAJqesgrJ4Mtm24mnFrDORjQ=; h=Date:To:Cc:References:From:Subject:In-Reply-To:From; b=KrF5o9fIuIiVJYiHPQzMlsmzd5hDJXREX36MxDfQ5GYUaAnLkwN5pl09blhdyPeo+ aEPjABwdKtXGw02VGesF0S/aRmTKcZbD/5Xn2swIYO37M3DqlCR2hh7piw/B70Waek Uc14DHK9Dzp8V6S4tWDXH8mJpSWHayd8mAiT9yA7VIHAoeUDr3FRXT7D4YTG4lNsyl OGeEsVPwp6hj+BdBXiYthLvkIaz59BQloJwoNUtMWzr9of8+JK03DNe6tYCi6JiS82 oLV6K4eSa5QR7SDYX7hx8k3mWyYOm44V6nyjk5EBlLCQvPh8BTnqf10OijLuscC0l/ r6W36rPaiQYpg== Content-Type: multipart/mixed; boundary="------------KJKs2ca5tYVH2KiHRPdorjVw" Message-ID: Date: Fri, 26 Aug 2022 13:24:57 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 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 Subject: Re: [GIT PULL] ncns update (chunked request body support) In-Reply-To: <8262e4f1-aead-70b7-bea7-8291a3316443@gnuweeb.org> List-Id: This is a multi-part message in MIME format. --------------KJKs2ca5tYVH2KiHRPdorjVw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. -- Ammar Faizi --------------KJKs2ca5tYVH2KiHRPdorjVw Content-Type: text/x-patch; charset=UTF-8; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2NobmV0L2NobmV0LmNjIGIvY2huZXQvY2huZXQuY2MKaW5kZXggMDkz NjYwYy4uZDA2NGQ1MiAxMDA2NDQKLS0tIGEvY2huZXQvY2huZXQuY2MKKysrIGIvY2huZXQv Y2huZXQuY2MKQEAgLTExMCwyMyArMTEwLDI0IEBAIGludCBDSE5ldENodW5rZWRQYXlsb2Fk OjpGbHVzaEJ1ZmZlclF1ZXVlKHZvaWQpCiAJaW50IHJldCA9IDA7CiAKIAl3aGlsZSAoIWJ1 Zl9xdWV1ZV8uZW1wdHkoKSkgewotCQlzdHJ1Y3QgY2h1bmtfdmVjIGM7CisJCXN0cnVjdCBj aHVua192ZWMgJmMgPSBidWZfcXVldWVfLmZyb250KCk7CiAJCXNpemVfdCBjb3B5X3NpemU7 Ci0KLQkJYyA9IGJ1Zl9xdWV1ZV8uZnJvbnQoKTsKLQkJYnVmX3F1ZXVlXy5wb3AoKTsKKwkJ Ym9vbCBkaWRfcG9wOwogCiAJCWlmICh1bmxpa2VseShjLmxlbl8gPT0gKHNpemVfdCl+MCkp IHsKKwkJCWJ1Zl9x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