http->data_remaining -= bytes;
http->stream.avail_in += bytes;
+ if (http->data_remaining <= 0 &&
+ http->data_encoding == HTTP_ENCODING_CHUNKED)
+ {
+ /*
+ * Read the trailing blank line now...
+ */
+
+ char len[32]; /* Length string */
+
+ httpGets(len, sizeof(len), http);
+ }
+
bytes = 0;
}
else
if (http->data_remaining == 0 && http->data_encoding == HTTP_ENCODING_CHUNKED)
{
if ((bytes = http_read_chunk(http, buffer, length)) > 0)
+ {
http->data_remaining -= bytes;
+
+ if (http->data_remaining <= 0)
+ {
+ /*
+ * Read the trailing blank line now...
+ */
+
+ char len[32]; /* Length string */
+
+ httpGets(len, sizeof(len), http);
+ }
+ }
}
else if (http->data_remaining <= 0)
{
length = (size_t)http->data_remaining;
if ((bytes = http_read_buffered(http, buffer, length)) > 0)
+ {
http->data_remaining -= bytes;
+
+ if (http->data_remaining <= 0 &&
+ http->data_encoding == HTTP_ENCODING_CHUNKED)
+ {
+ /*
+ * Read the trailing blank line now...
+ */
+
+ char len[32]; /* Length string */
+
+ httpGets(len, sizeof(len), http);
+ }
+ }
}
if (