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.
Feature request: new callback to report http chunks boundaries
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel F via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 20 Jun 2021 17:34:00 +0200
Hi all,
I am writing app which will receive updates (in JSON format) from
server. Server uses HTTP chunked transfer encoding. I also use TLS to
encrypt transmission. If I read curl code in lib/http_chunks.c
correctly, library guarantees that contents of multiple chunks is not
mixed when callback registered with CURLOPT_WRITEFUNCTION option is
called. However opposite is not true, write callback may be called
multiple times for one chunk. This means that I need some extra callback
in order to detect chunk boundaries, but I do not see such callback in
the code. I think of two possible callbacks: one called before first
part of a chunk is delivered to the app (it may have chunk size as a
param), and another called after last part of chunk is delivered to the
app. Any of them would be fine for me. Could you add it?
Regards,
Daniel
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-06-20
Date: Sun, 20 Jun 2021 17:34:00 +0200
Hi all,
I am writing app which will receive updates (in JSON format) from
server. Server uses HTTP chunked transfer encoding. I also use TLS to
encrypt transmission. If I read curl code in lib/http_chunks.c
correctly, library guarantees that contents of multiple chunks is not
mixed when callback registered with CURLOPT_WRITEFUNCTION option is
called. However opposite is not true, write callback may be called
multiple times for one chunk. This means that I need some extra callback
in order to detect chunk boundaries, but I do not see such callback in
the code. I think of two possible callbacks: one called before first
part of a chunk is delivered to the app (it may have chunk size as a
param), and another called after last part of chunk is delivered to the
app. Any of them would be fine for me. Could you add it?
Regards,
Daniel
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-06-20