char c = client.read();
//Serial.print(c);
readString = c;
int d1 = readString.indexOf('<');
int d2 = readString.indexOf('>');
readString1 = (readString.substring(d1+1,d2));
If c is <, it can't also be >. If it is >, it can't also be >. So, there are 3 possibilities:
- d1 could be -1 because c is >.
- d2 could be -1 because c is <.
- d1 and d2 are both -1 because c is something other than < or >.
In any case, the inputs to String::substring() are always invalid.