Fix for Safari not displaying the response correctly--the issue was it displayed the Content-Type header in the page--seemingly due to using '\r' in the response (I thought this was required...). Also change the buffer offset used to change the page background colour to match the corrected response string.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@74 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 3b8dab23f0
commit 3d6b27c0e3

@ -181,11 +181,11 @@ void sendPrompt(uint8_t *buffer) { // {Socket targetSocket, ) {
void sendBanner(uint8_t *buffer, int ledState) { // {Socket targetSocket, ) { void sendBanner(uint8_t *buffer, int ledState) { // {Socket targetSocket, ) {
//strcpy((char *) buffer, "Content-Type: text/plain\n\nfoo!\n"); //strcpy((char *) buffer, "Content-Type: text/plain\n\nfoo!\n");
strcpy((char *) buffer, "HTTP/1.1 200 OK\n\rContent-Type: text/html\n\r\n\r<html><body bgcolor='#000000'>foo!</body></html>\n\r"); strcpy((char *) buffer, "HTTP/1.1 200 OK\nContent-Type: text/html\n\n<html><body bgcolor='#000000'>foo!</body></html>\n");
if (ledState) { if (ledState) {
buffer[66] = 'F'; buffer[63] = 'F';
} else { } else {
buffer[68] = 'F'; buffer[65] = 'F';
} }
Serial.print("send result: "); Serial.print("send result: ");

Loading…
Cancel
Save