nhttpd: disable range handling for cached content

Origin commit data
------------------
Branch: ni/coolstream
Commit: ee1ab08bd4
Author: martii <m4rtii@gmx.de>
Date: 2014-09-23 (Tue, 23 Sep 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-09-23 11:45:59 +02:00
committed by vanhofen
parent a6ca39f1f0
commit 0fd995aea1
4 changed files with 20 additions and 16 deletions

View File

@@ -301,7 +301,7 @@ std::string CyhookHandler::BuildHeader(bool cache) {
strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&mod_time));
result += string_printf("Last-Modified: %s\r\n", timeStr);
if (status == HANDLED_SENDFILE) {
if (status == HANDLED_SENDFILE && !cached) {
result += string_printf("Accept-Ranges: bytes\r\n");
result += string_printf("Content-Length: %lld\r\n", RangeEnd - RangeStart + 1);
if (httpStatus == HTTP_PARTIAL_CONTENT)