#62 Streaming of files with unknown size

open
nobody
upnp (66)
5
2012-12-14
2011-10-05
Ranjish
No

It is mentioned that if the RespInstr->ReadSendSize is -1, streaming will happen till the end of file.
But in webservrvice.c because of the below statements streaming is not happening.
1. In CreateHTTPRangeResponseHeader() we have
if (FileLength < 0) {
free(RangeInput);
return HTTP_REQUEST_RANGE_NOT_SATISFIABLE;
}
and
2. In process_request() we have

RespInstr->ReadSendSize = finfo.file_length;
if ((err_code =
CheckOtherHTTPHeaders(req, RespInstr,
finfo.file_length)) != HTTP_OK) {
goto error_handler;
}

CheckOtherHTTPHeaders() will call CreateHTTPRangeResponseHeader().

Do we have any fix for this?

Thx
Ranjish

Discussion