9#ifndef SQUID_SRC_ANYP_URI_H
10#define SQUID_SRC_ANYP_URI_H
56 static char *
cleanup(
const char *uri);
75 void host(
const char *src);
121 static std::optional<SBuf>
Decode(
const SBuf &);
234char *
urlRInternal(
const char *host,
unsigned short port,
const char *dir,
const char *name);
char * urlRInternal(const char *host, unsigned short port, const char *dir, const char *name)
bool urlIsRelative(const char *)
char * urlInternal(const char *dir, const char *name)
int matchDomainName(const char *host, const char *domain, MatchDomainNameFlags flags=mdnNone)
const char * urlCanonicalFakeHttps(const HttpRequest *request)
bool urlCheckRequest(const HttpRequest *)
bool urlAppendDomain(char *host)
apply append_domain config to the given hostname
char * urlCanonicalCleanWithoutRequest(const SBuf &url, const HttpRequestMethod &, const AnyP::UriScheme &)
void urlExtMethodConfigure(void)
static const SBuf & SlashPath()
the static '/' default URL-path
Port port() const
authority port subcomponent
SBuf parseHost(Parser::Tokenizer &) const
void parseUrn(Parser::Tokenizer &)
AnyP::UriScheme const & getScheme() const
void touch()
clear the cached URI display forms
const SBuf & userInfo() const
SBuf & authority(bool requirePort=false) const
static SBuf DecodeOrDupe(const SBuf &input)
SBuf authorityHttp_
RFC 7230 section 5.3.3 authority, maybe without default-port.
void setScheme(const AnyP::ProtocolType &p, const char *str)
convert the URL scheme to that given
Ip::Address hostAddr_
binary representation of the URI authority if it is a raw-IP
char host_[SQUIDHOSTNAMELEN]
string representation of the URI authority name or IP
const char * host(void) const
SBuf & originForm() const
The RFC 7230 origin-form URI for currently stored values.
SBuf & absolutePath() const
RFC 3986 section 4.2 relative reference called 'absolute-path'.
static std::optional< SBuf > Decode(const SBuf &)
SBuf path_
URI path segment.
bool hostIsNumeric_
whether the authority 'host' is a raw-IP
std::optional< Host > parsedHost() const
void defaultPort()
reset the port to the default port number for the current scheme
SBuf absolutePath_
RFC 3986 section 4.2 absolute-path.
SBuf authorityWithPort_
RFC 7230 section 5.3.3 authority with explicit port.
static char * cleanup(const char *uri)
void addRelativePath(const char *relUrl)
Port port_
authority port subcomponent
void setScheme(const AnyP::UriScheme &s)
int parsePort(Parser::Tokenizer &) const
static const SBuf & Asterisk()
the static '*' pseudo-URI
void port(const Port p)
reset authority port subcomponent
const SBuf & path() const
bool parse(const HttpRequestMethod &, const SBuf &url)
SBuf absolute_
RFC 7230 section 5.3.2 absolute-URI.
Ip::Address const & hostIP(void) const
int hostIsNumeric(void) const
Uri & operator=(const Uri &)=default
static SBuf Encode(const SBuf &, const CharacterSet &expected)
void userInfo(const SBuf &s)
optimized set of C chars, with quick membership test and merge support
AnyP::Uri url
the request URI
void setEmpty()
Fast reset of the stored content to what would be after default constructor.
std::optional< KnownPort > Port
validated/supported port number (if any)
std::ostream & operator<<(std::ostream &, const Host &)