Implementation of HTTPD protocol, gwbuf properties and a dmeo web application

interface to test the new httpd.
This commit is contained in:
Mark Riddoch
2014-07-15 17:39:31 +01:00
parent 4ddc9c81a1
commit 6fd5dff349
14 changed files with 898 additions and 168 deletions

View File

@ -48,18 +48,20 @@
#define HTTPD_FIELD_MAXLEN 8192
#define HTTPD_REQUESTLINE_MAXLEN 8192
typedef enum {
METHOD_UNKNOWN = 0,
METHOD_POST,
METHOD_PUT,
METHOD_GET,
METHOD_HEAD
} HTTP_METHOD;
/**
* HTTPD session specific data
*
*/
typedef struct httpd_session {
char user[HTTPD_USER_MAXLEN]; /*< username for authentication*/
char *cookies; /*< all input cookies */
char hostname[HTTPD_HOSTNAME_MAXLEN]; /*< The hostname */
char useragent[HTTPD_USERAGENT_MAXLEN]; /*< The useragent */
char method[HTTPD_METHOD_MAXLEN]; /*< The HTTPD Method */
char *url; /*< the URL in the request */
char *path_info; /*< the Pathinfo, starts with /, is the extra path segments after the document name */
char *query_string; /*< the Query string, starts with ?, after path_info and document name */
int headers_received; /*< All the headers has been received, if 1 */
HTTP_METHOD method;
GWBUF *saved;
int request_len;
char *url;
} HTTPD_session;