Ignore:
Timestamp:
10/24/12 12:06:35 (12 years ago)
Author:
neise
Message:
more HMTL conformity ... 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • firmware/InterlockArduino/src/webserver/webserver.ino

    r14513 r14517  
    167167        {
    168168         eth += c;
    169          Serial.write(c);
    170          Serial.print(' ');
    171          Serial.print(c, HEX);
    172          Serial.print(' ');
    173          Serial.println(eth.length(), DEC);
     169         //Serial.write(c);
     170         //Serial.print(' ');
     171         //Serial.print(c, HEX);
     172         //Serial.print(' ');
     173         //Serial.println(eth.length(), DEC);
    174174         if ( eth.indexOf('\n') != -1 )
    175175         {
     
    250250{
    251251  // send a standard http response header
    252   client->print("HTTP/1.1 200 OK\n");
    253   client->print("Content-Type: text/html\n");
    254   client->print("Connnection: close\n");
    255   client->print("\n");
    256   client->print("<!DOCTYPE HTML>\n");
    257   client->print("<html><head>\n");
     252  client->print("HTTP/1.1 200 OK\r\n");
     253  client->print("Content-Type: text/html\r\n");
     254  client->print("Connnection: close\r\n");
     255  client->print("\r\n");
     256  client->print("<!DOCTYPE HTML>\r\n");
     257  client->print("<html><head>\r\n");
    258258 
    259259  // add a meta refresh tag, so the browser pulls again every 5 seconds:
    260   client->print("<meta http-equiv=\"refresh\" content=\"5; URL=index.html\" />\n");
    261   client->print("<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />\n"); 
    262  
    263   client->print("<title>FACT camera power interlock control</title></head><body>\n");
    264   client->print("<FORM NAME=\"Form\">\n");
     260  client->print("<meta http-equiv=\"refresh\" content=\"5; URL=index.html\" />\r\n");
     261  client->print("<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />\r\n"); 
     262 
     263  client->print("<title>FACT camera power interlock control</title></head><body>\r\n");
     264  client->print("<FORM NAME=\"Form\">\r\n");
    265265}
    266266
     
    285285      //client->print(" No ");
    286286    }
    287     client->print("</span> <br />\n");
     287    client->print("</span> <br />\r\n");
    288288  }
    289289}
     
    293293    for ( int button_id = 0; button_id < Number_of_Buttons; ++button_id )
    294294    {
    295         client->print("<P><INPUT TYPE=SUBMIT NAME=\"");
     295        client->print("<P><INPUT TYPE=\"SUBMIT\" NAME=\"");
    296296        client->print(button_name[button_id]);
    297297        client->print("\" VALUE=\"");
     
    305305        }
    306306       
    307         client->print("><br />\n");
     307        client->print(" /></P><br />\r\n");
    308308    }
    309309}
     
    318318void html_footer(EthernetClient *client)
    319319{
    320   client->print("</FORM></body></html>\n");
     320  client->print("</FORM></body></html>\r\n\r\n\r\n");
    321321}
    322322
Note: See TracChangeset for help on using the changeset viewer.