http-url.h revision d82ad7143c057c565e1fd5f3580645556ed0bcc9
b20208b80e99abb79c00d5ec526caa9465859c52Jakub Hrozek /* userinfo (not parsed by default) */
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher /* ?query (still encoded) */
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher /* #fragment (still encoded) */
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek unsigned int have_host_ip:1; /* URL uses IP address */
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan * HTTP URL parsing
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan /* Scheme part 'http:' is already parsed externally. This implies that
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan this is an absolute HTTP URL. */
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan /* Allow '#fragment' part in HTTP URL */
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher /* Allow 'user:password@' part in HTTP URL */
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozekint http_url_parse(const char *url, struct http_url *base,
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan enum http_url_parse_flags flags, pool_t pool,
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan struct http_url **url_r, const char **error_r);
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagherint http_url_request_target_parse(const char *request_target,
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan struct http_request_target *target, const char **error_r);
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher * HTTP URL manipulation
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallaghervoid http_url_copy_authority(pool_t pool, struct http_url *dest,
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallaghervoid http_url_copy(pool_t pool, struct http_url *dest,
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagherstruct http_url *http_url_clone(pool_t pool,const struct http_url *src);
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan * HTTP URL construction
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagherconst char *http_url_create(const struct http_url *url);
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozekconst char *http_url_create_host(const struct http_url *url);
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozekconst char *http_url_create_authority(const struct http_url *url);
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozekconst char *http_url_create_target(const struct http_url *url);
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallaghervoid http_url_escape_param(string_t *out, const char *data);