How to enable Transfer encoding chunked respose

Hi all,

I’m new to HTTP, so please bear with me :slight_smile:

I use the CoreHTTP (v2.1.0) and I try to send GET request to Google.

Google uses “Transfer-Encoding: chunked” header flag. I saw the F_CHUNKED flag for the response parser, but I don’t see where it is set. I suppose the it should be set automatically when the “Transfer-Encoding: chunked” is detected, but it is never set. If I force it normal GET request don’t longer work. On the other hand the flag F_CONTENT_LENGTH is set, and I don’t see where either.

Seems like only the first chunk is saved to my response buffer.

How can I make “Transfer-Encoding: chunked” response work?

Thank you

1 Like

Hi @Clonimus

Sorry for the late reply! I will contact the team and look into this issue to hopefully find you an answer.

Best,

Jason Carroll

Thank you, I appreciate it

Even though the underlying llhttp parser supports chunked response, I do not think we have tried it ever. This recent PR from one of the users seems to suggest that they are able to make it work. Do share your code if you make it work!

@aggarg

Thanks.

If I understand you correctly I need to merge this PR (and the one it is relied upon, #167) and then try?

My HTTP knowledge is minimal, if I’ll figure how to make it work I will update. If anyone can be of further assistance I’ll appreciate it greatly.

I guess only that would not be enough as the user wrote additional code to handle chunked responses. I have asked them if they can share their code - Add Ability to Stop Parsing After HTTP Headers by cryi · Pull Request #172 · FreeRTOS/coreHTTP · GitHub.

@Clonimus Please see the response by cryi@ on this PR - Add Ability to Stop Parsing After HTTP Headers by cryi · Pull Request #172 · FreeRTOS/coreHTTP · GitHub.

Thank You for sharing

Thank you
I will update once I have something new