1 /* 2 * Copyright 2014-2022 The GmSSL Project. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the License); you may 5 * not use this file except in compliance with the License. 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 */ 9 10 11 #ifndef URL_PARSER_H 12 #define URL_PARSER_H 13 14 #define URL_PARSER_VERSION 0x00000300 /* 0.0.3 */ 15 16 typedef struct url_components { 17 char *scheme; 18 char *user; 19 char *password; 20 char *host; 21 int port; 22 char *path; 23 char *query; 24 char *fragment; 25 } URL_COMPONENTS; 26 27 extern URL_COMPONENTS *parse_url(const char *url); 28 extern void free_url_components(URL_COMPONENTS *c); 29 30 #endif 31