uIP 1.0 based webserver for LPC1114 + ENC28J60

Dependencies:   mbed TMP102

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers http-strings.cpp Source File

http-strings.cpp

00001 #include "http-strings.h"
00002 
00003 //#define CRLF "\r\n"
00004 #define CRLF "\x0d\x0a"
00005 
00006 const char http_http[] = "http://";
00007 const char http_200[] = "200 ";
00008 const char http_301[] = "301 ";
00009 const char http_302[] = "302 ";
00010 const char http_get[] = "GET ";
00011 const char http_10[] = "HTTP/1.0";
00012 const char http_11[] = "HTTP/1.1";
00013 const char http_content_type[] = "content-type: ";
00014 const char http_texthtml[] = "text/html";
00015 const char http_location[] = "location: ";
00016 const char http_host[] = "host: ";
00017 const char http_referer[] = "Referer:";
00018 const char http_crnl[] = CRLF;
00019 
00020 const char http_index_html[] = "/index.html";
00021 const char http_404_html[]   = "/404.html";
00022 
00023 const char http_header_200[] = "HTTP/1.0 200 OK" CRLF
00024                                "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF
00025                                "Connection: close" CRLF;
00026 const char http_header_404[] = "HTTP/1.0 404 Not found" CRLF
00027                                "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF
00028                                "Connection: close" CRLF;
00029 
00030 const char http_content_type_plain[]  = "Content-type: text/plain" CRLF CRLF;
00031 const char http_content_type_html[]   = "Content-type: text/html" CRLF CRLF;
00032 const char http_content_type_css[]    = "Content-type: text/css" CRLF CRLF;
00033 const char http_content_type_text[]   = "Content-type: text/text" CRLF CRLF;
00034 const char http_content_type_png[]    = "Content-type: image/png" CRLF CRLF;
00035 const char http_content_type_gif[]    = "Content-type: image/gif" CRLF CRLF;
00036 const char http_content_type_jpg[]    = "Content-type: image/jpeg" CRLF CRLF;
00037 const char http_content_type_binary[] = "Content-type: application/octet-stream" CRLF CRLF;
00038 const char http_content_type_json[]   = "Content-type: application/json" CRLF CRLF;
00039 const char http_content_type_xml[]    = "Content-type: application/xml" CRLF CRLF;
00040 
00041 const char http_html[]  = ".html";
00042 const char http_shtml[] = ".shtml";
00043 const char http_htm[]   = ".htm";
00044 const char http_css[]   = ".css";
00045 const char http_png[]   = ".png";
00046 const char http_gif[]   = ".gif";
00047 const char http_jpg[]   = ".jpg";
00048 const char http_text[]  = ".text";
00049 const char http_txt[]   = ".txt";
00050 const char http_json[]  = ".json";
00051 const char http_xml[]   = ".xml";