Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Henrik Holst via curl-library
It depends on which JSON parser that you use, e.g YAJL have a setting yajl_allow_multiple_values which allows you to constantly feed data into the parser and it will still handle each JSON object as separate objects. And I bet that other parsers have similar functionality. To get out of the error

Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Daniel Stenberg via curl-library
On Sun, 20 Jun 2021, Daniel Stenberg via curl-library wrote: I think that would encourage really bad applications. This all said, you can disable decoding it with CURLOPT_HTTP_TRANSFER_DECODING and then you get to decode the chunked encoding yourself, which then allows you to find the bounda

Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Daniel Stenberg via curl-library
On Sun, 20 Jun 2021, Daniel F via curl-library wrote: 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.

Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Daniel F via curl-library
W dniu 2021-06-20 22:22, Dan Fandrich via curl-library napisał(a): On Sun, Jun 20, 2021 at 05:34:00PM +0200, Daniel F via curl-library wrote: 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 transmiss

Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Felipe Gasper via curl-library
Hi Daniel, Did you consider making your payload a JSON Text Sequence? That should allow what you want fairly easily. -FG > On Jun 20, 2021, at 16:08, Daniel F via curl-library > wrote: > > Hi all, > I am writing app which will receive updates (in JSON format) from server. > Server uses HTT

Re: Feature request: new callback to report http chunks boundaries

2021-06-20 Thread Dan Fandrich via curl-library
On Sun, Jun 20, 2021 at 05:34:00PM +0200, Daniel F via curl-library wrote: > 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