http-url.h revision d82ad7143c057c565e1fd5f3580645556ed0bcc9
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen /* userinfo (not parsed by default) */
7000810786f2959f02cd6d2f4151a9eb61ff5db8Timo Sirainen /* ?query (still encoded) */
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen /* #fragment (still encoded) */
7000810786f2959f02cd6d2f4151a9eb61ff5db8Timo Sirainen unsigned int have_host_ip:1; /* URL uses IP address */
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainen * HTTP URL parsing
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen /* Scheme part 'http:' is already parsed externally. This implies that
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen this is an absolute HTTP URL. */
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen /* Allow '#fragment' part in HTTP URL */
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainen /* Allow 'user:password@' part in HTTP URL */
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenint http_url_parse(const char *url, struct http_url *base,
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen struct http_url **url_r, const char **error_r);
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainenint http_url_request_target_parse(const char *request_target,
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainen struct http_request_target *target, const char **error_r);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainen * HTTP URL manipulation
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainenvoid http_url_copy_authority(pool_t pool, struct http_url *dest,
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenvoid http_url_copy(pool_t pool, struct http_url *dest,
cc935aff970ed6c24d136cc560c7e705a49d536cTimo Sirainenstruct http_url *http_url_clone(pool_t pool,const struct http_url *src);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainen * HTTP URL construction
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenconst char *http_url_create(const struct http_url *url);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenconst char *http_url_create_host(const struct http_url *url);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenconst char *http_url_create_authority(const struct http_url *url);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenconst char *http_url_create_target(const struct http_url *url);
d6a7cb184cc882a90aa3d9312082e0029f354ff6Timo Sirainenvoid http_url_escape_param(string_t *out, const char *data);