For a question in forum this is a working example, there will be the example that is not working

Dependencies:   mbed

Fork of eth_v13 by Heiko Greiner

html.h

Committer:
hggerdd
Date:
2014-03-21
Revision:
3:79dc3337d9da
Parent:
2:8f5bacfef390
Child:
4:a10e3d1bdb17

File content as of revision 3:79dc3337d9da:

#ifndef HTML_H_
#define HTML_H_

/*
const char html_head[] = "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nPragma: no-cache\r\n\r\n" \
                         "<html>\r\n<body>\r\n" \
                         "<title>Karl's W5100 web server (ATmega644p)</title>\r\n" \
                         "<h2>Karl's ATmega644p web server using Wiznet W5100 chip</h2>\r\n";
*/

const char html_head[] = "<html>\r\n<body>\r\n" \
                         "<title>Karl's W5100 web server (ATmega644p)</title>\r\n" \
                         "<h2>Karl's ATmega644p web server using Wiznet W5100 chip</h2>\r\n";

const char html_foot[] ="<br /><hr></html>\r\n";


const char c_HTTP_200_OK[] = "HTTP/1.0 200 OK\r\n";
const char c_HTTP_404_NotFound[] = "HTTP/1.0 404 Not Found\r\n";

/* Cache Control */
const char c_HTTP_CacheControl_NoCache[] = "Pragma: no-cache\r\nExpires: Fri, 01 Jan 1990 00:00:00 GMT\r\nCache-Control: no-cache, must-revalidate\r\n";

/* Content Types */
const char c_HTTP_Content_HTML[] = "Content-Type: text/html\r\n";
const char c_HTTP_Content_Javascript[] = "Content-Type: text/javascript\r\n";
const char c_HTTP_Content_Bmp[] = "Content-Type: image/bmp\r\n";
const char c_HTTP_Content_Ico[] = "Content-Type: image/ico\r\n";
const char c_HTTP_Content_Jpeg[] = "Content-Type: image/jpeg\r\n";
const char c_HTTP_Content_Gif[] = "Content-Type: image/gif\r\n";
const char c_HTTP_Content_Png[] = "Content-Type: image/png\r\n";

/* Content Length */
const char c_HTTP_Content_Length[] = "Content-Length: ";

/* Empty Line */
const char c_HTTP_EmptyLine[] = "\r\n";

/* File Extensions */
const char c_HTTP_FileExtension_Htm[] = "htm";
const char c_HTTP_FileExtension_Js[] = "js";
const char c_HTTP_FileExtension_Bmp[] = "bmp";
const char c_HTTP_FileExtension_Ico[] = "ico";
const char c_HTTP_FileExtension_Jpg[] = "jpg";
const char c_HTTP_FileExtension_Gif[] = "gif";
const char c_HTTP_FileExtension_Png[] = "png";

const char c_HTTP_Page_404[] = "<html><body><div id=\"title\" style=\"width: 800px; margin: 0 auto; text-align:center\"><h1>TheUno WebServer - Error 404</h1></div><br /><div id=\"text\" style=\"width: 800px; margin: 0 auto; text-align:center\"><p>The page requested was not found. Please click <a href=\"index.htm\">this link</a> to return on the main page of the WebServer.</p></div></body></html>\r\n";


#endif