1 #ifndef __LIB_HTTP_INCLUDE_H__ 2 #define __LIB_HTTP_INCLUDE_H__ 117 const char *from,
const char *to,
int ignore_case);
177 const char *method,
const char *version);
523 void *buf,
int size);
524 #define http_req_body_get_sync2 http_req_body_get_sync 538 void *buf,
int size);
539 #define http_res_body_get_sync2 http_res_body_get_sync 556 #define HTTP_CHAT_SYNC_CTL_END 0 557 #define HTTP_CHAT_CTL_BUFF_ONOFF 1 616 # if defined(WIN32) || defined(WIN64) HTTP_API const char * http_status_line(int status)
HTTP_API void http_tmpl_load(const char *tmpl_path)
HTTP_API int http_hdr_parse_version(HTTP_HDR *hh, const char *data)
HTTP_API int http_hdr_res_status_parse(HTTP_HDR_RES *hh, const char *dbuf)
HTTP_API http_off_t http_req_body_get_sync(HTTP_REQ *request, ACL_VSTREAM *stream, void *buf, int size)
int(* HTTP_HDR_NOTIFY)(int status, void *arg)
HTTP_API HTTP_HDR_ENTRY * http_hdr_entry_new2(char *data)
HTTP_API HTTP_HDR_ENTRY * http_hdr_entry_build(const char *name, const char *value)
HTTP_API void http_req_free(HTTP_REQ *request)
HTTP_API void http_hdr_req_get_async(HTTP_HDR_REQ *hdr, ACL_ASTREAM *astream, HTTP_HDR_NOTIFY notify, void *arg, int timeout)
HTTP_API HTTP_HDR_RES * http_hdr_res_error(int status)
HTTP_API void const char * name
HTTP_API void http_hdr_fprint(ACL_VSTREAM *fp, const HTTP_HDR *hh, const char *msg)
HTTP_API void http_hdr_req_free(HTTP_HDR_REQ *hh)
HTTP_API int http_hdr_res_get_sync(HTTP_HDR_RES *hdr, ACL_VSTREAM *stream, int timeout)
HTTP_API char * http_hdr_entry_value(const HTTP_HDR *hh, const char *name)
HTTP_API const char * http_hdr_req_host(const HTTP_HDR_REQ *hh)
HTTP_API int http_hdr_req_range(const HTTP_HDR_REQ *hdr_req, http_off_t *range_from, http_off_t *range_to)
HTTP_API int http_tmpl_size(int status)
ACL_API ACL_VSTRING const char * format
HTTP_API void http_hdr_free(HTTP_HDR *hh)
HTTP_API int http_hdr_res_parse(HTTP_HDR_RES *hdr_res)
HTTP_API const char * http_hdr_req_url(const HTTP_HDR_REQ *hh)
HTTP_API void http_res_free(HTTP_RES *respond)
HTTP_API void http_hdr_cache(int max)
HTTP_API HTTP_HDR_RES * http_hdr_res_static(int status)
HTTP_API HTTP_HDR_ENTRY * http_hdr_entry_head(char *data)
HTTP_API void http_hdr_put_int(HTTP_HDR *hdr, const char *name, int value)
HTTP_API int http_hdr_req_get_sync(HTTP_HDR_REQ *hdr, ACL_VSTREAM *stream, int timeout)
HTTP_API void http_hdr_build_request(const HTTP_HDR_REQ *hdr_req, ACL_VSTRING *strbuf)
HTTP_API void http_init(const char *tmpl_path)
HTTP_API int http_hdr_req_cookies_parse(HTTP_HDR_REQ *hh)
HTTP_API HTTP_HDR_REQ * http_hdr_req_rewrite(const HTTP_HDR_REQ *hh, const char *url)
HTTP_API const ACL_VSTRING * http_tmpl_get(int status)
HTTP_API int http_hdr_req_parse(HTTP_HDR_REQ *hh)
HTTP_API void http_hdr_print(const HTTP_HDR *hh, const char *msg)
HTTP_API void http_hdr_entry_off(HTTP_HDR *hh, const char *name)
HTTP_API void http_hdr_res_init(HTTP_HDR_RES *hdr_res, int status)
HTTP_API HTTP_HDR_RES * http_hdr_res_clone(const HTTP_HDR_RES *hdr_res)
HTTP_API void const char const char HTTP_API void http_hdr_put_time(HTTP_HDR *hdr, const char *name, time_t t)
HTTP_API void http_hdr_res_free(HTTP_HDR_RES *hh)
HTTP_API int http_hdr_req_line_parse(HTTP_HDR_REQ *hh)
HTTP_API void http_buf_size_set(http_off_t size)
HTTP_API int http_hdr_set_keepalive(const HTTP_HDR_REQ *req, HTTP_HDR_RES *res)
HTTP_API const char * http_hdr_req_method(const HTTP_HDR_REQ *hh)
HTTP_API const char * http_hdr_req_cookie_get(HTTP_HDR_REQ *hh, const char *name)
HTTP_API int http_hdr_res_range(const HTTP_HDR_RES *hdr_res, http_off_t *range_from, http_off_t *range_to, http_off_t *total_length)
HTTP_API void http_hdr_clone(const HTTP_HDR *src, HTTP_HDR *dst)
HTTP_API HTTP_HDR_REQ * http_hdr_req_clone(const HTTP_HDR_REQ *hdr_req)
HTTP_API const char * http_hdr_req_url_path(const HTTP_HDR_REQ *hh)
HTTP_API void http_hdr_res_get_async(HTTP_HDR_RES *hdr, ACL_ASTREAM *astream, HTTP_HDR_NOTIFY notify, void *arg, int timeout)
HTTP_API http_off_t http_res_body_get_sync(HTTP_RES *respond, ACL_VSTREAM *stream, void *buf, int size)
HTTP_API const char * http_mkrfc1123(char *buf, size_t size, time_t t)
HTTP_API void http_hdr_reset(HTTP_HDR *hh)
HTTP_API http_off_t http_buf_size_get(void)
HTTP_API int http_hdr_req_parse3(HTTP_HDR_REQ *hh, int parse_params, int parse_cookie)
HTTP_API HTTP_REQ * http_req_new(HTTP_HDR_REQ *hdr_req)
HTTP_API void http_hdr_put_str(HTTP_HDR *hdr, const char *name, const char *value)
HTTP_API const char * http_tmpl_title(int status)
int(* HTTP_BODY_NOTIFY)(int status, char *data, int dlen, void *arg)
HTTP_API void http_hdr_sprint(ACL_VSTRING *bf, const HTTP_HDR *hh, const char *msg)
HTTP_API void http_hdr_append_entry(HTTP_HDR *hh, HTTP_HDR_ENTRY *entry)
HTTP_API int http_hdr_req_rewrite2(HTTP_HDR_REQ *hh, const char *url)
HTTP_API HTTP_HDR_REQ * http_hdr_req_new(void)
HTTP_API HTTP_HDR_ENTRY * http_hdr_entry_new(const char *data)
HTTP_API void http_req_body_get_async(HTTP_REQ *request, ACL_ASTREAM *astream, HTTP_BODY_NOTIFY notify, void *arg, int timeout)
HTTP_API HTTP_HDR_RES * http_hdr_res_new(void)
HTTP_API HTTP_HDR * http_hdr_new(size_t size)
HTTP_API int http_hdr_entry_replace2(HTTP_HDR *hh, const char *name, const char *from, const char *to, int ignore_case)
HTTP_API const char * http_hdr_req_url_part(const HTTP_HDR_REQ *hh)
HTTP_API void http_hdr_req_reset(HTTP_HDR_REQ *hh)
HTTP_API int http_hdr_entry_replace(HTTP_HDR *hh, const char *name, const char *value, int force)
HTTP_API void __attribute__((format(printf, 3, 4))) http_hdr_put_fmt(HTTP_HDR *hdr
HTTP_API void http_chat_sync_resctl(HTTP_RES *respond, int name,...)
HTTP_API void http_uri_correct(int onoff)
HTTP_API void http_chat_sync_reqctl(HTTP_REQ *request, int name,...)
HTTP_API int http_hdr_parse(HTTP_HDR *hh)
HTTP_API void http_hdr_build(const HTTP_HDR *hdr, ACL_VSTRING *strbuf)
HTTP_API const char * http_hdr_req_param(const HTTP_HDR_REQ *hh, const char *name)
HTTP_API void http_hdr_res_reset(HTTP_HDR_RES *hh)
HTTP_API HTTP_HDR_REQ * http_hdr_req_create(const char *url, const char *method, const char *version)
HTTP_API HTTP_HDR_ENTRY * http_hdr_entry(const HTTP_HDR *hh, const char *name)
HTTP_API void const char const char * fmt
HTTP_API HTTP_RES * http_res_new(HTTP_HDR_RES *hdr_res)
HTTP_API void http_res_body_get_async(HTTP_RES *respond, ACL_ASTREAM *astream, HTTP_BODY_NOTIFY notify, void *arg, int timeout)