In #1850 I noticed that we have the following problem in our HTTP protocol helper. Our HttpHelper abstraction offers the methods receive_first() and receive_more(). However, I was not able to figure out a way to reliably get the whole body when we have chunked encoding and no content-length header is present. More specifically, I was not able at all to fine a generic way to check if we really have the whole body already or not. And in case one calls receive one time too often, we stuck in a blocking receive loop (if no new responses come in) which is very unfortunate.
We also should investigate how UEFI/edk2 processes chunked transmission under the hood and what the application layer has to do. Interesting pointers in EDK2: here
Once we figured everything out, we might can create more advanced unit tests using <httpbin.org> which helps us to test large chunked requests for example.
In #1850 I noticed that we have the following problem in our HTTP protocol helper. Our
HttpHelperabstraction offers the methodsreceive_first()andreceive_more(). However, I was not able to figure out a way to reliably get the whole body when we have chunked encoding and no content-length header is present. More specifically, I was not able at all to fine a generic way to check if we really have the whole body already or not. And in case one calls receive one time too often, we stuck in a blocking receive loop (if no new responses come in) which is very unfortunate.We also should investigate how UEFI/edk2 processes chunked transmission under the hood and what the application layer has to do. Interesting pointers in EDK2: here
Once we figured everything out, we might can create more advanced unit tests using <httpbin.org> which helps us to test large chunked requests for example.