#define MAXrelay 5
char* relayUse[] = {"test","cat","fish","bird","tree","lemon"};
for (int i = 1; i <= MAXrelay; ++i)
//for i loop code truncated for ease of reading..
Serial.print(i-1);
Serial.println(relayUse[i-1]);
I am at a total loss as to why index 0 and 1 normally are bad or wrong the Content-Length:, I assume index 2-3 are messed up because of 0, if I prevent index 0 from being returned it will give different data.
That piece of code as it stands is completely useless. Can you post a piece of code that compiles and demonstrates the problem? I suspect that in creating such a piece of code you will find that the problem is not reproducible.
My guess is that the problem is actually somewhere completely different. You have some bit of code overwriting your array - usually because you are extending past the end of some other array that is defined previously.