18#ifndef _DECAF_INTERNAL_NET_URIHELPER_H_
19#define _DECAF_INTERNAL_NET_URIHELPER_H_
36 const std::string unreserved;
37 const std::string punct;
38 const std::string reserved;
39 const std::string someLegal;
40 const std::string allLegal;
56 const std::string& punct,
57 const std::string& reserved,
58 const std::string& someLegal,
59 const std::string& allLegal );
84 void validateScheme(
const std::string& uri,
const std::string& scheme,
int index );
93 void validateSsp(
const std::string& uri,
const std::string& ssp,
163 void validateUserinfo(
const std::string& uri,
const std::string& userinfo, std::size_t index );
void validatePath(const std::string &uri, const std::string &path, std::size_t index)
Validate that the URI Path Segment contains no invalid encodings.
void validateAuthority(const std::string &uri, const std::string &authority, std::size_t index)
Validate that the URI Authority Segment contains no invalid encodings.
bool isValidDomainName(const std::string &host)
Validates the string past to determine if it is a well formed domain name.
URIHelper()
Sets up the filter strings with sane defaults.
void validateSsp(const std::string &uri, const std::string &ssp, std::size_t index)
Validate that the URI Ssp Segment contains no invalid encodings.
bool isValidIPv4Address(const std::string &host)
Validate if the host value is a well formed IPv4 address, this is the form XXX.XXX....
void validateFragment(const std::string &uri, const std::string &fragment, std::size_t index)
Validate that the URI fragment contains no invalid encodings.
bool isValidIP4Word(const std::string &word)
Check is the string passed contains a Valid IPv4 word, which is an integer in the range of 0 to 255.
void validateUserinfo(const std::string &uri, const std::string &userinfo, std::size_t index)
Check the supplied user info for validity.
URIType parseURI(const std::string &uri, bool forceServer)
Parse the passed in URI.
void validateScheme(const std::string &uri, const std::string &scheme, int index)
Validate the schema portin of the URI.
virtual ~URIHelper()
Definition URIHelper.h:66
URIHelper(const std::string &unreserved, const std::string &punct, const std::string &reserved, const std::string &someLegal, const std::string &allLegal)
Setup the URIHelper with values assigned to the various fields that are used in the validation proces...
void validateQuery(const std::string &uri, const std::string &query, std::size_t index)
Validate that the URI Query Segment contains no invalid encodings.
bool isValidIP6Address(const std::string &ipAddress)
Determines if the given address is valid according to the IPv6 spec.
bool isValidHost(bool forceServer, const std::string &host)
distinguish between IPv4, IPv6, domain name and validate it based on its type
bool isValidHexChar(char c)
Determines if the given char is a valid Hex char.
URIType parseAuthority(bool forceServer, const std::string &authority)
determine the host, port and user-info if the authority parses successfully to a server based authori...
Basic type object that holds data that composes a given URI.
Definition URIType.h:31
#define DECAF_API
Definition Config.h:29
Definition DefaultServerSocketFactory.h:27
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25