http-url.h revision 0dffa25d211be541ee3c953b23566a1a990789df
#ifndef HTTP_URL_H
#define HTTP_URL_H
#include "net.h"
#include "uri-util.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
};
int http_url_request_target_parse(const char *request_target,
/*
* HTTP URL manipulation
*/
/*
* HTTP URL construction
*/
#endif