Skip to content

Commit

Permalink
Update console.html
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 committed Nov 23, 2024
1 parent 78eb868 commit e3b5a34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion console.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ <h1>Caterpillar Proxy Console</h1>
// 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 {
Expand Down

0 comments on commit e3b5a34

Please sign in to comment.