uIP 1.0 based webserver for LPC1114 + ENC28J60

Dependencies:   mbed TMP102

Committer:
ban4jp
Date:
Mon Jun 30 16:00:08 2014 +0000
Revision:
3:a2715e9c7737
Parent:
2:4da9ed411bdc
backported from Contiki 2.7

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ban4jp 2:4da9ed411bdc 1 #include "http-strings.h"
ban4jp 2:4da9ed411bdc 2
ban4jp 2:4da9ed411bdc 3 //#define CRLF "\r\n"
ban4jp 2:4da9ed411bdc 4 #define CRLF "\x0d\x0a"
ban4jp 2:4da9ed411bdc 5
ban4jp 2:4da9ed411bdc 6 const char http_http[] = "http://";
ban4jp 2:4da9ed411bdc 7 const char http_200[] = "200 ";
ban4jp 2:4da9ed411bdc 8 const char http_301[] = "301 ";
ban4jp 2:4da9ed411bdc 9 const char http_302[] = "302 ";
ban4jp 2:4da9ed411bdc 10 const char http_get[] = "GET ";
ban4jp 2:4da9ed411bdc 11 const char http_10[] = "HTTP/1.0";
ban4jp 2:4da9ed411bdc 12 const char http_11[] = "HTTP/1.1";
ban4jp 2:4da9ed411bdc 13 const char http_content_type[] = "content-type: ";
ban4jp 2:4da9ed411bdc 14 const char http_texthtml[] = "text/html";
ban4jp 2:4da9ed411bdc 15 const char http_location[] = "location: ";
ban4jp 2:4da9ed411bdc 16 const char http_host[] = "host: ";
ban4jp 2:4da9ed411bdc 17 const char http_referer[] = "Referer:";
ban4jp 2:4da9ed411bdc 18 const char http_crnl[] = CRLF;
ban4jp 2:4da9ed411bdc 19
ban4jp 2:4da9ed411bdc 20 const char http_index_html[] = "/index.html";
ban4jp 2:4da9ed411bdc 21 const char http_404_html[] = "/404.html";
ban4jp 2:4da9ed411bdc 22
ban4jp 2:4da9ed411bdc 23 const char http_header_200[] = "HTTP/1.0 200 OK" CRLF
ban4jp 2:4da9ed411bdc 24 "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF
ban4jp 2:4da9ed411bdc 25 "Connection: close" CRLF;
ban4jp 2:4da9ed411bdc 26 const char http_header_404[] = "HTTP/1.0 404 Not found" CRLF
ban4jp 2:4da9ed411bdc 27 "Server: uIP/1.0 http://www.sics.se/~adam/uip/" CRLF
ban4jp 2:4da9ed411bdc 28 "Connection: close" CRLF;
ban4jp 2:4da9ed411bdc 29
ban4jp 2:4da9ed411bdc 30 const char http_content_type_plain[] = "Content-type: text/plain" CRLF CRLF;
ban4jp 2:4da9ed411bdc 31 const char http_content_type_html[] = "Content-type: text/html" CRLF CRLF;
ban4jp 2:4da9ed411bdc 32 const char http_content_type_css[] = "Content-type: text/css" CRLF CRLF;
ban4jp 2:4da9ed411bdc 33 const char http_content_type_text[] = "Content-type: text/text" CRLF CRLF;
ban4jp 2:4da9ed411bdc 34 const char http_content_type_png[] = "Content-type: image/png" CRLF CRLF;
ban4jp 2:4da9ed411bdc 35 const char http_content_type_gif[] = "Content-type: image/gif" CRLF CRLF;
ban4jp 2:4da9ed411bdc 36 const char http_content_type_jpg[] = "Content-type: image/jpeg" CRLF CRLF;
ban4jp 2:4da9ed411bdc 37 const char http_content_type_binary[] = "Content-type: application/octet-stream" CRLF CRLF;
ban4jp 2:4da9ed411bdc 38 const char http_content_type_json[] = "Content-type: application/json" CRLF CRLF;
ban4jp 2:4da9ed411bdc 39 const char http_content_type_xml[] = "Content-type: application/xml" CRLF CRLF;
ban4jp 2:4da9ed411bdc 40
ban4jp 2:4da9ed411bdc 41 const char http_html[] = ".html";
ban4jp 2:4da9ed411bdc 42 const char http_shtml[] = ".shtml";
ban4jp 2:4da9ed411bdc 43 const char http_htm[] = ".htm";
ban4jp 2:4da9ed411bdc 44 const char http_css[] = ".css";
ban4jp 2:4da9ed411bdc 45 const char http_png[] = ".png";
ban4jp 2:4da9ed411bdc 46 const char http_gif[] = ".gif";
ban4jp 2:4da9ed411bdc 47 const char http_jpg[] = ".jpg";
ban4jp 2:4da9ed411bdc 48 const char http_text[] = ".text";
ban4jp 2:4da9ed411bdc 49 const char http_txt[] = ".txt";
ban4jp 2:4da9ed411bdc 50 const char http_json[] = ".json";
ban4jp 2:4da9ed411bdc 51 const char http_xml[] = ".xml";