typedef int (*http_handler_t)(struct netconn *client, const char *name, char *revc_buf, size_t revc_len);
typedef int (*http_handler_t)(struct netconn *client, const char *name, char *revc_buf, size_t revc_len);
#define CGI_MATCH_NONE 0
#define CGI_MATCH_WORD 1 ///< Select item in table only if string match
#define CGI_MATCH_EXT 2 ///< Select item in table if the extention match
#define CGI_MATCH_NAME 3 ///< Select item in table if the string is content
#define CGI_MATCH_NONE 0
#define CGI_MATCH_WORD 1 ///< Select item in table only if string match
#define CGI_MATCH_EXT 2 ///< Select item in table if the extention match
#define CGI_MATCH_NAME 3 ///< Select item in table if the string is content
int http_getValue(char *tolenized_buf, size_t tolenized_buf_len, const char *key, char *value, size_t len);
int http_tokenizeGetRequest(char *raw_buf, size_t raw_len);
void http_getPageName(const char *recv_buf, size_t recv_len, char *page_name, size_t len);
void http_decodeUrl(const char *raw_buf, size_t raw_len, char *decodec_buf, size_t len);
int http_getValue(char *tolenized_buf, size_t tolenized_buf_len, const char *key, char *value, size_t len);
int http_tokenizeGetRequest(char *raw_buf, size_t raw_len);
void http_getPageName(const char *recv_buf, size_t recv_len, char *page_name, size_t len);
void http_decodeUrl(const char *raw_buf, size_t raw_len, char *decodec_buf, size_t len);
-void http_sendOk(struct netconn *client);
-void http_sendFileNotFound(struct netconn *client);
-void http_sendInternalErr(struct netconn *client);
+void http_sendOk(struct netconn *client, int content_type);
+void http_sendFileNotFound(struct netconn *client, int content_type);
+void http_sendInternalErr(struct netconn *client, int content_type);
void http_poll(struct netconn *server);
void http_init(http_handler_t default_callback, struct HttpCGI *table);
void http_poll(struct netconn *server);
void http_init(http_handler_t default_callback, struct HttpCGI *table);