TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HttpHeaders.h Source File

HttpHeaders.h

00001 //*****************************************************************************
00002 // Copyright (C) 2014 Texas Instruments Incorporated
00003 //
00004 // All rights reserved. Property of Texas Instruments Incorporated.
00005 // Restricted rights to use, duplicate or disclose this code are
00006 // granted through contract.
00007 // The program may not be used without the written permission of
00008 // Texas Instruments Incorporated or against the terms and conditions
00009 // stipulated in the agreement under which this program has been supplied,
00010 // and under no circumstances can it be used with non-TI connectivity device.
00011 //
00012 //*****************************************************************************
00013 
00014 #ifndef _HTTP_HEADERS_H_
00015 #define _HTTP_HEADERS_H_
00016 
00017 #include "datatypes.h"
00018 /**
00019  * @defgroup HttpHeaders HTTP header strings
00020  * This header file predefines various HTTP request and response header strings
00021  *
00022  * @{
00023  */
00024 
00025 char    HTTP_HEADER_DELIMITER[]         =  "\r\n";
00026 
00027 // HTTP method line strings
00028 char    HTTP_METHOD_GET[]               =  "get";
00029 char    HTTP_METHOD_POST[]              =  "post";
00030 char    HTTP_VERSION_1P1[]              =  "http/1.1";
00031 char    HTTP_VERSION_1P0[]              =  "http/1.0";
00032 
00033 // HTTP request/response header line strings
00034 char    HTTP_CONTENT_TYPE[]             =  "content-type";
00035 char    HTTP_CONTENT_LENGTH[]           =  "content-length";
00036 char    HTTP_ACCEPT_ENCODING[]          =  "accept-encoding";
00037 char    HTTP_AUTHORIZATION[]            =  "authorization";
00038 char    HTTP_CONNECTION_CLOSE[]         =  "connection";
00039 char    HTTP_GZIP[]                     =  "gzip";
00040 char    HTTP_CLOSE[]                    =  "close";
00041 char    HTTP_LOCATION[]                 =  "location";
00042 char    HTTP_CONTENT_ENCODING[]         =  "content-encoding";
00043 
00044 // HTTP response status line strings
00045 char    HTTP_STATUS_OK_STR[]                   =    "ok";
00046 char    HTTP_STATUS_REDIRECT_PERMANENT_STR[]   =    "moved permanently";
00047 char    HTTP_STATUS_REDIRECT_TEMPORARY_STR[]   =    "moved temporarily";
00048 char    HTTP_STATUS_ERROR_UNAUTHORIZED_STR[]   =    "unauthorized";
00049 char    HTTP_STATUS_ERROR_NOT_FOUND_STR[]      =    "not found";
00050 char    HTTP_STATUS_ERROR_NOT_ACCEPTED_STR[]   =    "not accepted";
00051 char    HTTP_STATUS_ERROR_INTERNAL_STR[]       =    "internal server error";
00052 
00053 //WebSocket upgrade header line strings
00054 char    WS_HOST[]                   =   "host";
00055 char    WS_UPGRADE[]                =   "upgrade";
00056 char    WS_CONNECTION[]             =   "connection";
00057 char    WS_VERSION_REQUEST[]        =   "sec-websocket-version";
00058 char    WS_KEY_REQUEST[]            =   "sec-websocket-key";
00059 char    WS_ORIGIN[]                 =   "origin";
00060 char    WS_CACHE_CONTROL[]          =   "cache-control";
00061 char    WS_PRAGMA[]                 =   "pragma";
00062 char    WS_EXTENSION[]              =   "sec-websocket-extensions";
00063 char*   WS_ORIGIN_NAME = NULL;
00064 
00065 //WebSocket response line strings
00066 char    WS_WEBSOCKET[]              =   "websocket";
00067 char    WS_MAGIC_STRING[]           =   "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
00068 char    WS_VERSION[]                =   "13";
00069 char    WS_ACCEPT[]                 =   "Sec-websocket-accept";
00070 
00071 ///Length of client generated key
00072 #define WS_KEY_LENGTH           24
00073 // The client generated key should be 16 bytes if base64 decoded
00074 UINT8 WS_KEY[WS_KEY_LENGTH + 1];
00075 
00076 /// @}
00077 #endif //_HTTP_HEADERS_H_
00078