Parse url into allocated scheme/user/host/port/path/query/fragment components.
Declared in <openssl/http.h>
int
OSSL_parse_url(
char const* url,
char** pscheme,
char** puser,
char** phost,
char** pport,
int* pport_num,
char** ppath,
char** pquery,
char** pfrag);
1 on success, or 0 on failure; free each returned string with OPENSSL_free().
| Name | Description |
|---|---|
| url | URL string to parse. |
| pscheme | Receives allocated scheme (for example "https"), or NULL to skip. |
| puser | Receives allocated userinfo, or NULL to skip. |
| phost | Receives allocated host, or NULL to skip. |
| pport | Receives allocated port string, or NULL to skip. |
| pport_num | Receives numeric port, or NULL to skip. |
| ppath | Receives allocated path (at least "/"), or NULL to skip. |
| pquery | Receives allocated query without leading '?', or NULL to skip. |
| pfrag | Receives allocated fragment without leading '#', or NULL to skip. |