http-url.h revision 777776de3515b6721381d2230c4182b6401cdce1
#ifndef HTTP_URL_H
#define HTTP_URL_H
#include "net.h"
#include "uri-util.h"
#include "http-common.h"
struct http_request_target;
struct http_url {
/* server */
/* userinfo (not parsed by default) */
const char *user;
const char *password;
/* path */
const char *path;
/* ?query (still encoded) */
const char *enc_query;
/* #fragment (still encoded) */
const char *enc_fragment;
bool have_ssl:1;
};
/*
* HTTP URL parsing
*/
enum http_url_parse_flags {
/* Scheme part 'http:' is already parsed externally. This implies that
this is an absolute HTTP URL. */
HTTP_URL_PARSE_SCHEME_EXTERNAL = 0x01,
/* Allow '#fragment' part in HTTP URL */
HTTP_URL_ALLOW_FRAGMENT_PART = 0x02,
/* Allow 'user:password@' part in HTTP URL */
HTTP_URL_ALLOW_USERINFO_PART = 0x04,
/* Allow URL to contain %00 */
HTTP_URL_ALLOW_PCT_NUL = 0x08,
};
int http_url_request_target_parse(const char *request_target,
/*
* HTTP URL evaluation
*/
{
}
{
return http_url_get_port_default(url,
}
/*
* HTTP URL manipulation
*/
/*
* HTTP URL construction
*/
#endif