diff --git a/console.html b/console.html index d5ed58e..89abdfa 100644 --- a/console.html +++ b/console.html @@ -134,7 +134,12 @@ // for dirty response (e.g., magic header, advertise logo) try { var start = s.indexOf('{'); - var end = s.lastIndexOf('}'); + var end = [s.indexOf("}\r\n\r\n"), s.lastIndexOf('}')].reduce(function(x) { + if (x > 0 && a < x) { + a = x; // set new value if x greater than 0 and x less than previous value + } + return a; + }, s.length); if (start > -1 && end > -1 && end > start) { responseData = JSON.parse(s.substring(start, end + 1)); } else {