mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Adding logging to icon server.
This commit is contained in:
parent
209eb08cf0
commit
65587ddc9c
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ app.get /^\/rss_feeds\/icon\/(\d+)\/?/, (req, res) =>
|
|||
feed_id = parseInt(req.params, 10)
|
||||
etag = req.header('If-None-Match')
|
||||
@collection.findOne _id: feed_id, (err, docs) ->
|
||||
console.log "Req: #{feed_id}, etag: #{etag}/#{docs?.color}"
|
||||
console.log "Req: #{feed_id}, etag: #{etag}/#{docs?.color} (err: #{err}, docs? #{!!(docs and docs.data)})"
|
||||
if not err and etag and docs and docs?.color == etag
|
||||
res.send 304
|
||||
else if not err and docs and docs.data
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
return _this.collection.findOne({
|
||||
_id: feed_id
|
||||
}, function(err, docs) {
|
||||
console.log("Req: " + feed_id + ", etag: " + etag + "/" + (docs != null ? docs.color : void 0));
|
||||
console.log("Req: " + feed_id + ", etag: " + etag + "/" + (docs != null ? docs.color : void 0) + " (err: " + err + ", docs? " + (!!(docs && docs.data)) + ")");
|
||||
if (!err && etag && docs && (docs != null ? docs.color : void 0) === etag) {
|
||||
return res.send(304);
|
||||
} else if (!err && docs && docs.data) {
|
||||
|
|
Loading…
Add table
Reference in a new issue