diff options
| author | 刘学利 <[email protected]> | 2022-06-01 08:02:07 +0000 |
|---|---|---|
| committer | 刘学利 <[email protected]> | 2022-06-01 08:02:07 +0000 |
| commit | 274614cde4d166fb1209e51432609377f48ee7e8 (patch) | |
| tree | c8efb60d425cc1f55cc8bc3efdee6f8605f76c09 /src/http.h | |
| parent | b672af8e7e48ea426410497d7b0b22ca6767a879 (diff) | |
TSG-9128, TSG-9650: 提供解析HTTP头部字段的函数http_field_parserv2.0.10
Diffstat (limited to 'src/http.h')
| -rw-r--r-- | src/http.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -255,6 +255,22 @@ int is_absolute_uri(void* app_info); int http_host_parser(const char* buf, uint32 buflen, int http_dir, char** host); +/* +* ����˵���� +* ��һ�����ݽ���HTTPͷ���ֶν������ж��Ƿ���HTTPЭ�飬�����ظ�buf�������HTTPͷ���ֶ� +* ����˵��: +* buf: �������� (�����ǵ���HTTP���ӵ�����,��֧��һ��HTTP�������ݶ�ν�����Ҳ��֧��buf�����ж��http���ӵ�����) +* buflen: �������ݵij��� +* http_dir: ����buf��������DIR_C2S or DIR_S2C +* ����ֵresult: +* !=NULL: ��buf��HTTPЭ�����ݣ���������ͷ���ֶ� +* NULL: ��buf����HTTPЭ������ +*/ +void *http_field_parser(const char* buf, uint32 buflen, int http_dir); +// return length of field_value, field_flag=(HTTP_HOST/HTTP_MESSAGE_URL/...) +int http_get_filed_result(void *result, long long field_flag, char **field_value); +void http_free_filed_result(void *result); + #ifdef __cplusplus } |
