ban4jp -
/
uIP-1-0_webserver
uIP 1.0 based webserver for LPC1114 + ENC28J60
Diff: apps/webserver/http-strings.cpp
- Revision:
- 2:4da9ed411bdc
- Parent:
- 0:685224d2f66d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/webserver/http-strings.cpp Sat Jun 21 11:54:24 2014 +0000 @@ -0,0 +1,51 @@ +#include "http-strings.h" + +//#define CRLF "\r\n" +#define CRLF "\x0d\x0a" + +const char http_http[] = "http://"; +const char http_200[] = "200 "; +const char http_301[] = "301 "; +const char http_302[] = "302 "; +const char http_get[] = "GET "; +const char http_10[] = "HTTP/1.0"; +const char http_11[] = "HTTP/1.1"; +const char http_content_type[] = "content-type: "; +const char http_texthtml[] = "text/html"; +const char http_location[] = "location: "; +const char http_host[] = "host: "; +const char http_referer[] = "Referer:"; +const char http_crnl[] = CRLF; + +const char http_index_html[] = "/index.html"; +const char http_404_html[] = "/404.html"; + +const char http_header_200[] = "HTTP/1.0 200 OK" CRLF + "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF + "Connection: close" CRLF; +const char http_header_404[] = "HTTP/1.0 404 Not found" CRLF + "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF + "Connection: close" CRLF; + +const char http_content_type_plain[] = "Content-type: text/plain" CRLF CRLF; +const char http_content_type_html[] = "Content-type: text/html" CRLF CRLF; +const char http_content_type_css[] = "Content-type: text/css" CRLF CRLF; +const char http_content_type_text[] = "Content-type: text/text" CRLF CRLF; +const char http_content_type_png[] = "Content-type: image/png" CRLF CRLF; +const char http_content_type_gif[] = "Content-type: image/gif" CRLF CRLF; +const char http_content_type_jpg[] = "Content-type: image/jpeg" CRLF CRLF; +const char http_content_type_binary[] = "Content-type: application/octet-stream" CRLF CRLF; +const char http_content_type_json[] = "Content-type: application/json" CRLF CRLF; +const char http_content_type_xml[] = "Content-type: application/xml" CRLF CRLF; + +const char http_html[] = ".html"; +const char http_shtml[] = ".shtml"; +const char http_htm[] = ".htm"; +const char http_css[] = ".css"; +const char http_png[] = ".png"; +const char http_gif[] = ".gif"; +const char http_jpg[] = ".jpg"; +const char http_text[] = ".text"; +const char http_txt[] = ".txt"; +const char http_json[] = ".json"; +const char http_xml[] = ".xml";