mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 07:21:46 +00:00
Update console.html
This commit is contained in:
parent
78eb86800c
commit
e3b5a344e3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user