1e653c7406ec0b062c0bacfdf2e7568a3f860500Stephan Bosch /* userinfo (not parsed by default) */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch /* ?query (still encoded) */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch /* #fragment (still encoded) */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch * HTTP URL parsing
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch /* Scheme part 'http:' is already parsed externally. This implies that
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch this is an absolute HTTP URL. */
1e653c7406ec0b062c0bacfdf2e7568a3f860500Stephan Bosch /* Allow '#fragment' part in HTTP URL */
1e653c7406ec0b062c0bacfdf2e7568a3f860500Stephan Bosch /* Allow 'user:password@' part in HTTP URL */
89e040049336e69c43fec09dcbdfd0f2ae5efd51Martti Rannanjärvi /* Allow URL to contain %00 */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschint http_url_parse(const char *url, struct http_url *base,
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch struct http_url **url_r, const char **error_r);
e641c9f656f1788ca6226ef0d60b2d592e2ca6d1Stephan Boschint http_url_request_target_parse(const char *request_target,
e641c9f656f1788ca6226ef0d60b2d592e2ca6d1Stephan Bosch struct http_request_target *target, const char **error_r);
777776de3515b6721381d2230c4182b6401cdce1Stephan Bosch * HTTP URL evaluation
777776de3515b6721381d2230c4182b6401cdce1Stephan Boschstatic inline in_port_t http_url_get_port_default(const struct http_url *url,
777776de3515b6721381d2230c4182b6401cdce1Stephan Bosch return (url->port != 0 ? url->port : default_port);
777776de3515b6721381d2230c4182b6401cdce1Stephan Boschstatic inline in_port_t http_url_get_port(const struct http_url *url)
777776de3515b6721381d2230c4182b6401cdce1Stephan Bosch (url->have_ssl ? HTTPS_DEFAULT_PORT : HTTP_DEFAULT_PORT));
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Bosch * HTTP URL manipulation
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Boschvoid http_url_copy_authority(pool_t pool, struct http_url *dest,
4356563bc3261a4043ec736cb1009373d37a617cStephan Boschstruct http_url *http_url_clone_authority(pool_t pool,
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Boschvoid http_url_copy(pool_t pool, struct http_url *dest,
92c2272787b74eb000f05a926e9103a25a6a0dc0Stephan Boschvoid http_url_copy_with_userinfo(pool_t pool, struct http_url *dest,
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Boschstruct http_url *http_url_clone(pool_t pool,const struct http_url *src);
92c2272787b74eb000f05a926e9103a25a6a0dc0Stephan Boschstruct http_url *http_url_clone_with_userinfo(pool_t pool,
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch * HTTP URL construction
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschconst char *http_url_create(const struct http_url *url);
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Boschconst char *http_url_create_host(const struct http_url *url);
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan Boschconst char *http_url_create_authority(const struct http_url *url);
069def4dc35022852d569b7ab75a3b19d2cb0f1cTimo Sirainenconst char *http_url_create_target(const struct http_url *url);
a952a4444e46e107b15ab1bd0e8b63a29f94b123Timo Sirainenvoid http_url_escape_path(string_t *out, const char *data);
c911297407bdcc7c7936305eb8f791b450d6375cTimo Sirainenvoid http_url_escape_param(string_t *out, const char *data);