AWS StepFunction HTTP Invoke. Transfer-Encoding: chunked vs Content-Length

0

I see that the HTTP Invoke Task from StepFunctions uses "Transfer-Encoding: chunked" and streams data to the 3rd party. Why is that so? Afaik it's way better to use the more adopted way of setting the Content-Length as we already know the size of the content in advance anyway. Could you please support that, or do you have it in your roadmap to implement?

Siggi
질문됨 3달 전197회 조회
1개 답변
-1
  • Transfer-Encoding: chunked is used when the size of the content is not known in advance or is dynamically generated. This allows the sender to start transmitting dynamically generated content before knowing the total size, which can be beneficial for large files or streams.
  • On the other hand, Content-Length is used when the size of the content is known in advance. It allows the receiver to know the exact size of the content that will be received, which can be useful for progress tracking and resource allocation.

I do not have hold of any roadmap

profile picture
전문가
답변함 3달 전
  • Thanks for the reply, but I didn't ask what those headers are. I'm well aware of it. My question is why they use "Transfer-Encoding: chunked" as they know the payload in advance. It is the input of the task and smaller than 256kb. Whenever we know the size in advance it makes way more sense to use the Content-Length approach. I hope the request gets somehow forwarded to the StepFunction team.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠