This is rather a question to satisfy curiosity.

How does standard HTTP 1.1 stacks compute chunk-sizes on a HTTP response socket? Is it timeout based, max size based or depends on when the application does a flush on the socket, or an algorithm based on all of them? Is there any open HTTP 1.1 stack implementation guideline available on this?

Thanks in advance.

有帮助吗?

解决方案

There is no "standard" HTTP/1.1 stack. Often you have to do it yourself, e.g. make sure a transfer-encoding: chunked header is send, then send all the chunks prefixed with length and then the last empty chunk.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top