mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
统一os_log
This commit is contained in:
@@ -34,15 +34,13 @@
|
||||
|
||||
#define HTTP_CONTENT_HTML_ZIP "text/html\r\nContent-Encoding: gzip"
|
||||
|
||||
#define app_httpd_log(M, ...) do { custom_log("apphttpd", M, ##__VA_ARGS__); web_log(M, ##__VA_ARGS__) } while(0)
|
||||
|
||||
#define HTTPD_HDR_DEFORT (HTTPD_HDR_ADD_SERVER|HTTPD_HDR_ADD_CONN_CLOSE|HTTPD_HDR_ADD_PRAGMA_NO_CACHE)
|
||||
|
||||
#define send_http(DATA, LEN, LABEL, P_ERR) \
|
||||
*(P_ERR) = httpd_send_all_header(req, HTTP_RES_200, LEN , HTTP_CONTENT_HTML_STR); \
|
||||
require_noerr_action(*(P_ERR), LABEL, app_httpd_log("ERROR: Unable to send http DATA headers.")); \
|
||||
require_noerr_action(*(P_ERR), LABEL, http_log("ERROR: Unable to send http DATA headers.")); \
|
||||
*(P_ERR) = httpd_send_body(req->sock, (const unsigned char*)DATA, LEN); \
|
||||
require_noerr_action(*(P_ERR), LABEL, app_httpd_log("ERROR: Unable to send http DATA body.")); \
|
||||
require_noerr_action(*(P_ERR), LABEL, http_log("ERROR: Unable to send http DATA body.")); \
|
||||
|
||||
#define TC1_STATUS_JSON \
|
||||
"{\
|
||||
|
||||
Reference in New Issue
Block a user