projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some utility to manage query strings.
[bertos.git]
/
bertos
/
net
/
http.h
diff --git
a/bertos/net/http.h
b/bertos/net/http.h
index 4cbdaac08443b3c499ec45fbd23f475300843eb9..9fe4c3818d4bda4bf5fe8d1486b409c24bf1053c 100644
(file)
--- a/
bertos/net/http.h
+++ b/
bertos/net/http.h
@@
-54,12
+54,15
@@
typedef struct HttpCGI
http_handler_t handler; ///< Callback to process the special request
} HttpCGI;
http_handler_t handler; ///< Callback to process the special request
} HttpCGI;
-
#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
+#define HTTP_MAX_GET_TOKENS 5
+
+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_decodeUri(const char *raw_buf, size_t raw_len, char *decodec_buf, size_t len);
void http_getPageName(const char *recv_buf, size_t recv_len, char *page_name, size_t len);
void http_decodeUri(const char *raw_buf, size_t raw_len, char *decodec_buf, size_t len);