urlparse_parse_url

Synopsis

#include <urlparse.h>

int urlparse_parse_url(const char *url, size_t urllen, int is_connect, urlparse_url *u)

urlparse_parse_url() parses url of length urllen bytes, and stores the result in u. If is_connect is nonzero, it parses the URL as a request target that appears in CONNECT request, that is, consisting of only the host and port number.

This function initializes u before its use. If this function returns nonzero, u might not be initialized.

This function returns 0 if it succeeds, or URLPARSE_ERR_PARSE.