I went digging through the ESP8266WebServer.h and .cpp and found that even if I was passing a char * address, the library was promoting the data to a String class. Which I think is the reason I was trying to trouble shoot a intermittent problem.
To this end I wrote for my self the following routines at end. Which appropriate additions to the header.
(Unfortunately the formatting isn't preserved by this editor. So I've attached my edited source files.)
Timothy
void ESP8266WebServer::send(int code, const char* content_type, const char *content) {
String header;
_prepareHeader(header, code, content_type, strlen(content));
sendContent(header);
sendContent(content);
}
void ESP8266WebServer::sendContent(const char *content) {
const size_t unit_size = HTTP_DOWNLOAD_UNIT_SIZE;
size_t size_to_send = strlen(content);
const char* send_start = content;
while (size_to_send) {
size_t will_send = (size_to_send < unit_size) ? size_to_send : unit_size;
size_t sent = _currentClient.write(send_start, will_send);
if (sent == 0) {
break;
}
size_to_send -= sent;
send_start += sent;
}
}