projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add other string search method for cgi table.
[bertos.git]
/
bertos
/
net
/
http.h
diff --git
a/bertos/net/http.h
b/bertos/net/http.h
index 53d8100d1ded6ebc9d092f73f87ff2265dc017f1..2b49c7f0b7dd7abbb084711842187df394f943ae 100644
(file)
--- a/
bertos/net/http.h
+++ b/
bertos/net/http.h
@@
-43,14
+43,7
@@
#ifndef NET_HTTP_H
#define NET_HTTP_H
#ifndef NET_HTTP_H
#define NET_HTTP_H
-
-#include <netif/ethernetif.h>
-
-#include <lwip/ip.h>
-#include <lwip/ip_addr.h>
-#include <lwip/netif.h>
#include <lwip/tcpip.h>
#include <lwip/tcpip.h>
-#include <lwip/dhcp.h>
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);
@@
-63,8
+56,11
@@
typedef struct HttpCGI
#define CGI_MATCH_NONE 0
#define CGI_MATCH_NONE 0
-#define CGI_MATCH_
NAME
1 ///< Select item in table only if string match
+#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_EXT 2 ///< Select item in table if the extention match
+#define CGI_MATCH_NAME 3 ///< Select item in table if the string is content
+
+void http_getPageName(const char *revc_buf, size_t recv_len, char *page_name, size_t len);
void http_sendOk(struct netconn *client);
void http_sendFileNotFound(struct netconn *client);
void http_sendOk(struct netconn *client);
void http_sendFileNotFound(struct netconn *client);
@@
-73,4
+69,8
@@
void http_sendInternalErr(struct netconn *client);
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);
+int http_testSetup(void);
+int http_testRun(void);
+int http_testTearDown(void);
+
#endif /* NET_HTTP_H */
#endif /* NET_HTTP_H */