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

@@ -32,6 +32,8 @@ THandleStatus CmodCache::Hook_PrepareResponse(CyhookHandler *hh) {
std::string url = hh->UrlData["fullurl"];
if (CacheList.find(url) != CacheList.end()) // is in Cache. Rewrite URL or not modified
{
hh->cached = true;
pthread_mutex_lock(&mutex); // yeah, its mine
// Check if modified
@@ -82,6 +84,7 @@ THandleStatus CmodCache::Hook_SendResponse(CyhookHandler *hh) {
{
AddToCache(hh, url, hh->yresult, hh->HookVarList["CacheMimeType"],
category); // create cache file and add to cache list
hh->cached = true;
hh->ContentLength = (hh->yresult).length();
hh->RangeEnd = (hh->yresult).length()-1;
hh->SendFile(CacheList[url].filename); // Send as file