From a13c1f61af258fa29a32a8d1918803759e749ce4 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 24 Feb 2014 17:34:00 +0100 Subject: [PATCH] Do not log an error for a legit request requiring no X-Cache-Channel --- NEWS.md | 1 + lib/cartodb/cartodb_windshaft.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 544a43f2..4ace926a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ Enhancements: * Expand "addCacheChannel" stats * Allow using GET with sql-api for queries shorter than configured len (#155) [ new sqlapi.max_get_sql_length directive, defaults to 2048 ] + * Do not log an error for a legit request requiring no X-Cache-Channel Bug fixes: diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 58402575..566fd60c 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -75,6 +75,11 @@ var CartodbWindshaft = function(serverOptions) { // creation return false; } + if ( ! req.params ) { + // service requests (/version, /) + // have no need for an X-Cache-Channel + return false; + } if ( statusCode != 200 ) { // We do not want to cache // unsuccessful responses