curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: HTTP/2 deferring DATA frame to another TCP packet

From: Pontakorn Prasertsuk via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 22 Jun 2023 11:08:01 +0800

My apology. There is a problem with my build that caused disabling
TCP_NODELAY to not work. Now that I build it again, all the packets are
collapsed into 1 TCP packet. However, they are on different TLS records. Is
there a way to combine them into a single TLS record as well? This issue
may have to do with how nghttp2 data source callback defers DATA frame on
its first call as I mentioned in the original email.

Regards,
Pontakorn

On Wed, Jun 21, 2023 at 5:02 PM Pontakorn Prasertsuk <
ptk.prasertsuk_at_gmail.com> wrote:

> I tried running `SSLKEYLOGFILE=/tmp/sslkeylog.log src/curl --location "
> https://localhost:8000" --insecure --http2 --data "1234567890" -H
> "Content-type: text/plain" -v --no-tcp-nodelay`
>
> The packet capture still shows the DATA frame separated from the HEADER
> frame. The packet with (text/plain) is the body of the POST request:
>
> [image: curl_no_tcp_nodelay.png]
>
> Regards,
> Pontakorn
>
> On Wed, Jun 21, 2023 at 4:11 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Wed, 21 Jun 2023, Pontakorn Prasertsuk via curl-library wrote:
>>
>> > I have a POST body with length 10. The header `Content-length: 10` is
>> > present in the HEADER frame of my request. Referring to the image, the
>> POST
>> > body is in the third packet after the HEADER packet (with SETTINGS
>> packet
>> > from server and ACK packet from the client in between). It should be
>> > possible to fit the DATA frame into the first packet with the HEADER
>> frame
>> > but I cannot find a way to do it in libcurl.
>>
>> Maybe switching off TCP_NODELAY ?
>>
>> See this issue from a few years ago:
>> https://github.com/curl/curl/issues/6363
>>
>> --
>>
>> / daniel.haxx.se
>> | Commercial curl support up to 24x7 is available!
>> | Private help, bug fixes, support, ports, new features
>> | https://curl.se/support.html
>>
>


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

curl_no_tcp_nodelay.png
(image/png attachment: curl_no_tcp_nodelay.png)

Received on 2023-06-22