diff --git a/examples/Getting_Started_SimpleServer_Mesh/Getting_Started_SimpleServer_Mesh.ino b/examples/Getting_Started_SimpleServer_Mesh/Getting_Started_SimpleServer_Mesh.ino index e5c1990..7d2a5c8 100644 --- a/examples/Getting_Started_SimpleServer_Mesh/Getting_Started_SimpleServer_Mesh.ino +++ b/examples/Getting_Started_SimpleServer_Mesh/Getting_Started_SimpleServer_Mesh.ino @@ -148,7 +148,7 @@ void loop() { Serial.print((char)client.read()); } // Send an HTML response to the client. Default max size/characters per write is 90 - client.print("HTTP/1.1 200 OK\n Content-Type: text/html\n Connection: close \nRefresh: 5 \n\n"); + client.print("HTTP/1.1 200 OK\r\n Content-Type: text/html\r\n Connection: close \r\nRefresh: 5 \r\n\n"); client.print("\n HELLO FROM ARDUINO!"); client.stop(); diff --git a/examples/InteractiveServer_Mesh/HTML.h b/examples/InteractiveServer_Mesh/HTML.h index 75242ff..409e65d 100644 --- a/examples/InteractiveServer_Mesh/HTML.h +++ b/examples/InteractiveServer_Mesh/HTML.h @@ -19,11 +19,11 @@ bool led_state = 0; // The basic beginning of an HTML connection, plus // a style (CSS) section and header to be used on every page -static const PROGMEM char begin_html[] = "HTTP/1.1 200 OK\n" - "Content-Type: text/html\n" //40b - "Connection: close\n\n" //59 - "\n" //75 - "" //87 +static const PROGMEM char begin_html[] = "HTTP/1.1 200 OK\r\n" + "Content-Type: text/html\r\n" //40b + "Connection: close\r\n\n" //59 + "\n" //75 + "" //87 "\n"), 45); - _client.write(buffer); + _client.print(buffer); strncpy_P(buffer, PSTR("
Uptime\n"), 45); - _client.write(buffer); + _client.print(buffer); sprintf_P(buffer, PSTR("%u days, %lu hours %lu minutes %lu"), days, hours, minutes, seconds); - _client.write(buffer); + _client.print(buffer); strncpy_P(buffer, PSTR("seconds
UIP Buffer Size"), 45); - _client.write(buffer); + _client.print(buffer); sprintf_P(buffer, PSTR("%u bytes
User "), UIP_BUFSIZE); - _client.write(buffer); + _client.print(buffer); sprintf_P(buffer, PSTR("Output
Buffer Size
%u bytes"), OUTPUT_BUFFER_SIZE); - _client.write(buffer); + _client.print(buffer); strncpy_P(buffer, PSTR("


"), 45); - _client.write(buffer); + _client.print(buffer); strncpy_P(buffer, PSTR("Home"), 45); - _client.write(buffer); + _client.print(buffer); } /***************************************************************/ /** -* An example of a very basic HTML page -*/ -static const char html_page[] PROGMEM = "HTTP/1.1 200 OK\n" - "Content-Type: text/html\n" - "Connection: close\n\n" + * An example of a very basic HTML page + */ +static const PROGMEM char html_page[] = "HTTP/1.1 200 OK\r\n" + "Content-Type: text/html\r\n" + "Connection: close\r\n\n" "" "" ""