Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.07 KB

url_parser.md

File metadata and controls

48 lines (31 loc) · 1.07 KB

url解析器

  • http_url_parser.c

  • http_url_parser.h

解析url,产生相应的参数。

数据结构

url的各个字段内容:

typedef struct http_connect_params {
    char                        *http_url;
    char                        *http_scheme;
    char                        *http_host;
    char                        *http_user;
    char                        *http_password;
    char                        *http_path;
    char                        *http_query;
    char                        *http_farg;
    char                        *http_cert_pem;
    uint16_t                    http_port;
} http_connect_params_t;

外部函数

  • 解析url的各个字段内容并且保存在http_connect_params_t结构中。
int http_url_parsing(http_connect_params_t *connect_params, const char *url)

内部函数

依赖

上一篇HTTP回调事件

下一篇HTTP报文处理