I wrote a raw TCP client for HTTP/HTTPS requests, however I\'m having problems with chunked encoding responses. HTTP/1.1 is requirement therefore I should support it.
<
For the future reference also I found this :
length := 0
read chunk-size, chunk-extension (if any) and CRLF
while (chunk-size > 0) {
read chunk-data and CRLF
append chunk-data to entity-body
length := length + chunk-size
read chunk-size and CRLF
}
read entity-header
while (entity-header not empty) {
append entity-header to existing header fields
read entity-header
}
Content-Length := length
Remove "chunked" from Transfer-Encoding