Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Fix bug where DISK/MEM hit status is being output in the headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
dansimau committed May 20, 2011
1 parent 1d468d2 commit a1077d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/proxy.js
Expand Up @@ -77,7 +77,7 @@ function proxyRequestListener(req, res) {
req._proxyMeta.meta.cacheStatus = {'cache': 'HIT', 'lookup': 'HIT'};
}

req._proxyMeta.meta.cacheStatus.cache = cachedata.hit + '_' + req._proxyMeta.meta.cacheStatus.cache;
req._proxyMeta.meta.cacheStatus.source = cachedata.hit;
appendXcacheHeaders(req._proxyMeta.cache.headers, req._proxyMeta.meta.cacheStatus);

res.writeHead(req._proxyMeta.cache.statusCode, req._proxyMeta.cache.headers);
Expand Down Expand Up @@ -248,7 +248,7 @@ function writeLog(req) {
"\"" + req.method + " " + req.url + " HTTP/" + req.httpVersion + "\" " +
req._proxyMeta.cache.statusCode + " " +
req._proxyMeta.cache.body.length + " " +
req._proxyMeta.meta.cacheStatus.cache + ":" + req._proxyMeta.meta.cacheStatus.lookup + "\n", 'utf8');
req._proxyMeta.meta.cacheStatus.source + '_' + req._proxyMeta.meta.cacheStatus.cache + ":" + req._proxyMeta.meta.cacheStatus.lookup + "\n", 'utf8');
}

exports._writeLog = writeLog;
Expand Down

0 comments on commit a1077d4

Please sign in to comment.